Parent Form and Child - Not synced

KLahvic01

Registered User.
Local time
Today, 13:32
Joined
May 3, 2012
Messages
80
I have a parent form which has detailed product information, on this form I have a combobox which allows me to search for and goto a particular record, this works just fine. I have a subform which has purchase order transactions related to the particular product on it. Both the Master and Child are linked using ProductID. What I am not able to figure out is when I use the combobox to search for the individual product, the purchase order detail is not changing so the subform is not following the selection on the parent form. Not sure what to do here, anyone have any suggestions?

thanks,

KJ
 
I would check the Master and Child are links. I think that is all that should be needed for this to work.
You could try to requery the sub form in the On Current event of the main form.
 
Thanks Bob, I thought that it would be the case as well but it isnt working. Is there a chance that since the combo on the parent is unbound and gets its data from a query would make a difference?

Also, what is the proper syntax to requery a subform from the on current event of the main form?

Thanks,

KJ
 
what is the proper syntax to requery a subform from the on current event of the main form?
I believe it is:
Me.NameOfSubform.Form.Requery
You would need to substitue NameOfSubform with the name of the subform.
If the requery does not work, could you post a copy of the db with a few dummy records. It would need to be in A2003 MDB format.
 
I believe it is:
Me.NameOfSubform.Form.Requery

Not really. It is Me.NameOfSubformCONTROL.Form.Requery.

The Subform Control (control on the parent form which houses/displays the subform) is the name you must use. It can share the same exact name of the subform (and many times does) but it is the name of the subform control that needs to be used. That messes people up quite often because a lot of the time their subform and their subform control are named the same, so it looks like it is the subform name that is being used. But then there may be a time where they add the subform but the subform control gets a name like Child3 and then their code doesn't work because they didn't use Me.Child3.Form.Requery like they should have.

Just thought I'd better explain that.
 
Bob Larson,

Thank you. You are, of course correct. I should have made that clearer to the OP.
 
Thank you both for the assistance thus far

I added the requery statement as described and still I make a selection out of the combobox and the subform stays at the first record it pulled up.

Hopefully it is something simple.

KJ
 
Can you post a copy of the db with a few dummy records. It would need to be in A2003 MDB format.
 
Excuse my ignorance, but how do I save a 2010 accdb to a 2003 mdb? I have never done this before.
 

Users who are viewing this thread

Back
Top Bottom