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 / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Display data in form based on dropdown list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sfleck - 25 May 2007 16:05 GMT
I have a table or a query that i would like to control what is displayed on
the form by a dropdown list but am having a brain freeze on how to best to
accomplish that
Ofer Cohen - 25 May 2007 16:15 GMT
Look at this link on "Using a Microsoft Access Combo Box to Search for a
Record"

http://www.databasedev.co.uk/combo_box_search.html
Signature

Good Luck
BS"D

> I have a table or a query that i would like to control what is displayed on
> the form by a dropdown list but am having a brain freeze on how to best to
> accomplish that
sfleck - 25 May 2007 21:19 GMT
Thank you for the link.  As with most things now that know this I would like
to expand the functionality...

If the search return multiple records can I display them alltogether?

> Look at this link on "Using a Microsoft Access Combo Box to Search for a
> Record"
[quoted text clipped - 4 lines]
> > the form by a dropdown list but am having a brain freeze on how to best to
> > accomplish that
Ofer Cohen - 27 May 2007 15:32 GMT
For that you can try another method:
********************************
You can use a Main Form that contain the combo, and Sub Form to list all the
records that match the selection.

In the RecordSource of the SubForm you can create a reference to the combo
in the main form

Select * From TableName Where FieldName = Forms![MainFormName]![ComboName]

***************************
If you want all the records to return if no value was selected in the combo,
then add another criteria to the RecordSource of the SubForm

Select * From TableName Where FieldName = Forms![MainFormName]![ComboName]
Or Forms![MainFormName]![ComboName] Is Null
***************************
On the AfterUpdate event of the combo run the code
Me.[SubFormControlName].Requery

To refresh the list of data in the SubForm
***************************

Signature

Good Luck
BS"D

> Thank you for the link.  As with most things now that know this I would like
> to expand the functionality...
[quoted text clipped - 9 lines]
> > > the form by a dropdown list but am having a brain freeze on how to best to
> > > accomplish that
 
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.