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 2008

Tip: Looking for answers? Try searching our database.

Combo to select form then combo to select field for query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
buscher75 - 22 May 2008 15:01 GMT
Hello-

My goal is to use a form to prompt a query and open up a report.  

What I would like on the form is to have a combo box to select one of three
tables.  Then, have a second combo box appear with the fields from the
selected table to choose from.

For simplicity purposes, let's call the forms -
form1 with fields - field11, field12, field13
form2 with fields - field21, field22, field23
form3 with fields - field31, field32, field33

What would be the best approach for accomplishing this?  

Thanks in advance for your help!!!
Jeanette Cunningham - 23 May 2008 11:34 GMT
buscher75,
you could use a select case statement for the after update event of the
first combo.

Select case Me.NameOfFirstCombo
   Case "table1"
       Me.NameOfSecondCombo.RowSource = "qry1"

   Case "table2"
       Me.NameOfSecondCombo.RowSource = "qry2"

   Case "table3"
       Me.NameOfSecondCombo.RowSource = "qry3"
End Select

Replace table'n' with your table names.
qry1 is the query with the appropriate fields for when user selects table1,
and so on for the other 2 choices.

Jeanette Cunningham -- Melbourne Victoria Australia

> Hello-
>
[quoted text clipped - 13 lines]
>
> Thanks in advance for your help!!!
 
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.