Parent Form Not Recognizing SubForm Requery Criteria Code

N

neenmarie

I have a subform and the following are some of its controls:
[PartNumber], [Vendor], [Qty], [OutGoingShipNumber]

It has a list box that is requeried with [Qty] lostfocus.
The query this list box is based on has criteria set to then only show
records matching the [PartNumber] and [Vendor] that have balances left at the
vendor so the user can see what the originating outgoing shipper number was.
Clicking on the record then fills in the [OutGoingShipNumber] control.

This all works fine on the subform alone. But, when I open the parent form
with the subform on it, the two criteria set in the list box query are not
recognized...and show up as if asking for input before the form will open.
(Forms!RcvgSubform.PartNumber) and (Forms!RcvgSubform.Vendor) Once the
parent form is opened the requery doesn't work at all.

Do I need to reference the Parent form in the query also? If so, can
someone give me an example of the code. If that's not the problem...any
other ideas?

The Parent Form also has a [Vendor] Control that requeries a different list
box on the subform to show all Purchase Orders and PartNumbers matching that
vendor. The source query for this listbox has criteria set to check the
[vendor] on the Parent.
The [Vendor] is automatically filled in on the Subform from the Parent and
the [PartNumber] is filled in by clicking the record from the list box. This
part works fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top