combobox based on form field

J

joannanoriega

I have an order form with a tab control
On each tab are some fields and some subforms.
On my second tab, I have a subform with a combobox field that should
pick from values based on which record the main form is sitting on.
The main form is an order form, each order being a record.
Each order generates one or more shipments, each shipment generates one
or more packing list lines.
The second tab has a subform that lists the shipments and another
subform that lists the packing list lines.
I want to generate packing list lines and assign them to a shipment,
but not just any shipment, a shipment from the current order record.
I have managed to create a combobox that pulls its source from the
shipments in the current order.
My problem is in moving to another record.
Once the combobox has been pulled down, the values remain for any order
record (it's allowing me to add packing list lines for shipments on
other order records, not the current one).
I need the list to update with the correct choices for shipments when I
move to a different order record.
I've tried using requery for the combobox, but it's not working out
right. I can pull down the box on one record, but when I move to
another, the values will update, then only allow me to choose the first
in the list, then it applies that value to all packing list lines
automatically.

Any ideas out there?
 
J

joannanoriega

nevermind, I found it...
I needed to put the requery in the OnCurrent for the subform
I had been trying to put it in OnEnter, etc.
 

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