Searching query based on searched query. (1 Viewer)

darksniper

Registered User.
Local time
Today, 01:43
Joined
Sep 4, 2005
Messages
108
I have a form with a list of ids(that shows one id at a time and the description of that id). I have a combo box that shows me list of the ids and it allows me to go to the id that I select.

I have a subform that shows records(one at a time) based on the id that was selected in the from. I have a combo box that shows me list of the ids in the subform(based on the id that was selected in the main form) and it allows me to go to the id that I select. so that I could add data in the second subform which is based on the main form and first subform.

The issue that I am having is when I select the id in the main form. The query is runned in the first sub form to show me the ids of the first sub form based on the id on the main form. But as soon as I change the id in the main form, query that runs in the first subform does not run, and I am stuck with the ids of when the query was runned the first time.

What can I do to make the query run in the first subform every time I select different id in the main form.

Thank you!
 
M

marleymanner1

Guest
I've actually had this problem before, but I can't remember back when that happened. Obviously, if your first subform is sourced from your query, this code on the after update of the combo box should be all you need:
Code:
me.subformname.requery
The possibilities are endless here if you ask me...


and for anyone monitoring this post, YES, it has to be the subform container name, and not just the name of the object, but since most beginners name them both the same name anyway, it probably doesn't matter what I say in this instance. ;)
 

darksniper

Registered User.
Local time
Today, 01:43
Joined
Sep 4, 2005
Messages
108
thanks, I will try it and let you know the outcome!!
 

darksniper

Registered User.
Local time
Today, 01:43
Joined
Sep 4, 2005
Messages
108
I get an error message cannot find macro "me"

How do I fix that?
 

Users who are viewing this thread

Top Bottom