Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

ComboBox Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iholder - 10 Mar 2005 17:09 GMT
I have a combo-box with a list of week ending dates.  These week ending dates
are used to filter a report. The date range from week ending dates from 2003
to 2010.

Is there a way when the combo box gets focus the current week ending date is
the default selection.

Thank You
JaRa - 10 Mar 2005 19:31 GMT
Is the dropdown getting this data from a table?

I suggest to populate a table with the following structure

TableName: Weeks
Field :
Week_ID
Week_Number
Week_EndDate

The source for the Combobox should be set to : Week_Select for which the SQL :
SELECT Week_ID, Week_Number, Week_EndDate FROM Weeks ORDER BY Week_Number DESC

Then on Form_Open you should perform the following code :

cmbWeeks=DLookup("Week_ID","Week_Select","Week_EndDate<=Date()")

I think this will do the trick.

- Raoul



> I have a combo-box with a list of week ending dates.  These week ending dates
> are used to filter a report. The date range from week ending dates from 2003
[quoted text clipped - 4 lines]
>
> Thank You
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.