Text box autofill?

lovett10

Registered User.
Local time
Today, 05:44
Joined
Dec 1, 2011
Messages
150
Hi,

i have a textbox called "Text88" which is labelled Client Contact. What i want to happen is this automatically fills in information from the table "Customers". All the other text boxes and combo boxes write to the table "VisitSheetTable". VisitSheetTable and Customers have one field in common "Customer" which i am hoping can be used to link them together.

Basically what i want is when the user selects the Customer the text box Text88 automatically fills the client contact in..

Thanks for the help, its really hard to explain :)
 
Hi,

i have a textbox called "Text88" which is labelled Client Contact.
Then why haven't you renamed it something like txtClientContact. That is much easier to use and to know what it is when you see the name than Text88.
What i want to happen is this automatically fills in information from the table "Customers". All the other text boxes and combo boxes write to the table "VisitSheetTable". VisitSheetTable and Customers have one field in common "Customer" which i am hoping can be used to link them together.

Basically what i want is when the user selects the Customer the text box Text88 automatically fills the client contact in..

Thanks for the help, its really hard to explain :)
I'll try to explain a couple of things for you.

1. If you have a combo which has the list of customers, then the customer is stored somewhere, usually a table like tblCustomers.

2. If you have a form which is bound to the VisitSheetTable table, then the combo box would be having its row source selecting from the Customers table but the CONTROL SOURCE would be bound to the Customer Field found in the VisitSheetTable from the form's record source.

3. You would normally have an ID (I use autonumbers because I don't care what it is as long as it is unique) which is in the Customers table along with their other information. You would store that ID number, instead of the Customer name, in the VisitSheetTable table.

4. To do that with the combo box, your combo would use a SQL Select Statement (or a saved query) which pulls both fields from the Customer Table. Like this:
Code:
Select ID, CustomerName FROM Customers ORDER BY CustomerName

5. The combo's column count property would then need to be set to 2 and the column width property set to something like 0";2" (or if using metric 0 cm;4 cm) (I may be off in the centimeters as I don't use them.)

EDIT: That would mean that the text box isn't even needed.

That's about it.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom