How to return results from Customer selected in combo box in subfo

J

JCislo

I have a combo box of customers that I am pulling from a SQL table. I have a
table named RMA# that accumulates all of the data (CustomerName, Customer
Number, Product, etc.). Once the customer is selected I query the RMA# table
into a subform that reflects the history of RMA#'s for the customer selected
from the combo box. My problem is that the query does not run when the
customer is selected from the box. However it does run the query and shows
it in the subform when I click back to the previous record. I think this is
just an order issue, but would appreciate any help you can provide.
 
R

RuralGuy

I have a combo box of customers that I am pulling from a SQL table. I have a
table named RMA# that accumulates all of the data (CustomerName, Customer
Number, Product, etc.). Once the customer is selected I query the RMA# table
into a subform that reflects the history of RMA#'s for the customer selected
from the combo box. My problem is that the query does not run when the
customer is selected from the box. However it does run the query and shows
it in the subform when I click back to the previous record. I think this is
just an order issue, but would appreciate any help you can provide.

Are you sure you have the Link Master/Child Fields set properly? I
would expect that when you select the customer from the ComboBox on
the MainForm that the MainForm moves to that customer and the SubForm
displays the RMA history for that customer. Do you also have
navigation buttons on the MainForm?
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
J

JCislo

I thought I did, but now you mention it I went back in and now I can't find
where the Master/Child Link is. Refresh me where to go to verify. Also,
there are the standard navagation button on the bottom of the form. I will
be removing those though when I create the live form to be used. I
appreciate your assistance.

Jeff
 
J

JCislo

Found the Master and Child data. I went through the wizard and both are set
to Customer Name.
THanks again
 
R

RuralGuy

I would think that CustomerNumber would be the Proper link. Are the
Form and the SubForm based on the same query? I assume when you say
"I query the RMA# table into a subform..." that you mean the SubForm
is based on a query of the RMA# table and you do nothing special to
"query the RMA# table inot the subform". If that is not the case then
there is an understanding of a Form/SubForm relationship that is
missing. You are not maintaining the customer name in more than one
location are you?

Found the Master and Child data. I went through the wizard and both are set
to Customer Name.
THanks again

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

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