combo box wizard

G

Guest

Hi,

I have a design of 1:M Customer:Representative. That is a one to many,
customer to representative.

I want to put a combo box on my SUB-form that lists the representatives of
the customer, so that when I select the relevant representative from the
combo box it navigates to that rep. Great if you have say 10-15 reps for a
customer and don't want to scroll through or conduct a find.

I have a combo box for customers on the main form and all is great for that
one.

But on the sub form, it doesn't seem to be 'refreshing" as I navigate
thorugh the customers. The combo box continues to show the recordset of the
reps from the first initial customer. When I navigate to customer number two,
the combo box on my subform has not updated to reflect the new reps on my
subform. Note: The subform itself has updated the reps, but the combo box on
my subform still shows the reps from the previous customer.

The recordset of the combo box on my subform contains a where clause that
links the CustomerID field.

WHERE
(((qrySubContacts.CustomerID)=[Forms]![frmCustomer]![frmRepresentativeSubform].[Form]![CustomerID]));

Any help to get the combo box on my subform to refresh when I change records
the parent form would be most appreciated.
 
G

Guest

Ok, how many times does it happen, after not being able to work it out for
ages, you post something, minutes after the post you work it out. Sorry to
trouble you.

End up putting some code in the got focus event (me.refresh). That worked.
Seemed to refresh the recordset of the combo box.
Also put Me.cboRep.Value = ""
in order to clear the last rep from the list.

All is good.
 

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