Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Box Query

Status
Not open for further replies.

manoskok

Technical User
Mar 15, 2001
20
GR
I'm having a difficult time to make a text box to show the customer name from a table.


I have two tables
tblCustomer (CustomerID, CustomerName, etc)

tblDigmatol (DigmatolID, CustomerID, etc)

and I use a form (frmDigmatol) to enter data for each new analysis (to tblDigmatol table).
The form has the following fields :
DigmatolID
CustomerID
etc

What I need is to have a text box in the frmDigmatol which shows the CustomerName from the tblCustomer table for the current CustomerID.
Please help.
Thanks in advance.
 
Did you try making a combo box instead of a text box? Then you'll see the customer name instead of the customer id if the id is the "hidden key" as the wizard will call it.

HTH Joe Miller
joe.miller@flotech.net
 
Thanks for your answer.
I did that but I don't know how to set it up
in order to show the correct CustomerName for each CustomerID.

The CustomerID has control source the tblDigmatol.
While the combobox has to take the CustomerID from the tblDigmatol and find the Corresponding Customer Name from the tblCustomers.

I can't think of a possible solution.
 
Make a query based on your CustomerID table with CustomerID in the first column and Customer Name in the second column. Then make a combo box on your form with 2 columns and set the Row Source Type to Table/Query and your row source to the name of your query. Now set the Control Source of your combo box to [CustomerID] from your tblDigmatol table. What will then happen is rather than showing the ID from tblDigmatol your combo box will go to the query of Customers and get the corresponding CustomerName instead.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top