Live updating form?

laxster

Registered User.
Local time
Yesterday, 23:22
Joined
Aug 25, 2009
Messages
145
I have a form in which there is a dropdown for Branch/Plant locations. Upon selection of a branch/plant, the dropdown below that populates with all the items available at that branch/plant.

The problem I am encountering is that if someone chooses the wrong branch/plant from the list, the item dropdown menu doesn't populate itself to reflect the new branch/plant selection. How can I make this populate automatically without having to go out of and back into the form again?
 
Generally you would have code in the after update event of the first combo to either requery or reset the source of the second, depending on the method you used.
 
What code should I use? The below code I wrote doesn't seem to work, but perhaps I'm going about it all wrong:

Code:
Private Sub Plant_AfterUpdate()
Forms![Placard generation table1].Requery

End Sub
 
You would requery the combo, not the form:

Forms!FormName.ComboName.Requery
 
Okay, so one more question. I have a list of branch/plants that need to be EXCLUDED from the drop down list. On the query built to match the branch/plant to items, I created a criteria which filters out the listed branch/plants. Unfortunately, it doesn't work, it just starts duplicating the items instead of filtering out the branch plants!

If I build a query all by itself with the same criteria it filters out the branch plants I don't want listed automatically, but with the requery it won't let me do this.

What can I do?
 
Can you post the db? Requerying the combo should work, presuming the criteria is corrrect.
 

Users who are viewing this thread

Back
Top Bottom