Auto fill text boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI,

How do i auto display information into text boxes in a form?

i have a table that contains: job number, client, contract #, description

I have a dropdown box on my form for the job number, and i want the user to
be able to select the job number and have the corresponding text boxes
automatically fill in with the info from the table? i dont want the user to
have to select from a dropdown menu for all the fields in the table!!! just
the job number!

what do i have to do so that the text boxes auto fill in??? (please be
specific, as i am new to programming)!!

Thanks, Cheers.

Em
 
Hi emmy

Here goes:-

Open your form in Design View
make sure you have given your text boxes a friendly name (e.g. txtClient,
txtDescription etc.)
Create a query using the wizard that includes all the fields you need and
save it (you could call it qryJob, for example)
Right click the combo (drop down) box, select Properties
On the Data tab, in Row Source type the name of the query you have just saved
On the Data tab, in Bound Column type 1 (assuming that the column you want
to disply in the combo box is the 1st in your query)
On the Format tab, in Column Count type the number of columns in your query
(you have listed 4 below)
On the Format tab, in Column Widths type an appropriate width for each
column (e.g. 3cm;0cm;0cm;0cm - this example will display the 1st column only
with a width of 3cm)

Right click on the 1st text box and select Properties
On The Data tab, in Control Scource type:-
=NameOfYourComboBox.Column(1)
Substitute NameOfYourComboBox for the name of your combo box!
The number in brackets is the number of the field you want to display -
remember that the 1st column is column(0)!

Repeat the above step for each text box

Hopefully, it should all work!

Andrew
 
it works! but now i need the auto filled text boxes to update the forms
corresponding table.

i have the combo box looking up from my "job number" table, in a form called
"bbo card entry" and i need the auto filled text boxes to enter that data
into my BBO card table".

the auto filled text boxes just display the data, how do i get them to store
that data into another table? in the wizards, it gives you the option to take
the data and bind it to a column in another table, how do i do that with the
textboxes now that they're autofill? the control source is already set? do i
have to manipulate it through an event?

heelp, thanks a million
 
Let me get this straight: you have a table for jobs and a table BBO cards.
Your table BBO has to have a corresponding field with the jobnumber. In a
query, link the two tables by the job number. Your query should have all BBO
fields including the job number field from your BBO table, and the
additional fields from the job table. Now you base your form on that query .
Your BBO table will now have the job number in it from the query.
Subsequently, to display data from your bbo table, you will always link the
jobs table to your bbo table to give you the additional jobs fields that the
jobs table has.
Anne
 
it works! but now i need the auto filled text boxes to update the forms
corresponding table.

Ummm... No. You DON'T need to store data redundantly in a second
table!

You should store this data *ONCE*, and once only. If you need it
again, use a Query linking to the table to combine it. The Client,
Description etc. should be stored only in the Jobs table; all you need
to store in the second table is the job number.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top