data populating from drop down menu

mdhr

New member
Local time
Yesterday, 21:21
Joined
Jul 12, 2017
Messages
6
Hi,

I am trying to make a drop down menu and populate the data of the selected object.

when selecting a city from the drop down menu, the resulting table or query should display all the details of the selected city.

I hope to find some solution here.

Thank you.
 

Attachments

The query for the combo box that holds the details, should use cboCity in its criteria....
Select detail from table where city = forms!myForm!cboCity

But you must put a requery in the AFTERUPDATE event so the cbo box it can see the new pick...

Code:
Sub cboCity_afterupdate()
CboDetail.requery
End sub
 
Thanks Ranman!!

I am new to Access so i couldnot catch up with your explanation. Could you explain more in detail? where shall i write the code
and the cboCity?
 
Yes, in cboCity...
Select cboCity, properties, events tab, AFTERUPDATE event box,
Click the ellipsis button in the box,
Click CODE,
Put the code here.
 
Cannot I write formula in the query, to give the detail of the selected object?

In the query, populate the data of the city Hamburg only, if Hamburg is selected in the drop down menu in the table.

Is there some way to achieve this?

I am trying to do it with the lookup table.
 

Users who are viewing this thread

Back
Top Bottom