fill in text boxes from other table

cadillac

Registered User.
Local time
Today, 03:50
Joined
May 9, 2001
Messages
34
how can i fill in text boxes on a form with data from a table?
 
Bind the form to a query or table by specifying a recordsource. Then bind the individual controls to a field in the recordsource by specifying a controlsource.

It is easier to bind the form when you first create it. Then you can pick fields from the field list and Access will automatically bind them.
 
the form is bound to the table where i want the data to go. i want to take the information from record 1 of a table and insert it into a textbox of a form. i will probably use a query to select only the data i want, but i can't get the textbox to pull the data from one table and then write it to another along with the rest of the textboxes on the form.
 
i think i can use something similar to what i use to fill in information in textboxes after selecting a value from a combo box. i have tried using the statement attached to the onclick event in a popup that i have:

forms!form.textbox = queryname.field

i get debug errors using this though. am i on the right track?

thanks

[This message has been edited by cadillac (edited 05-28-2001).]

[This message has been edited by cadillac (edited 05-28-2001).]
 
Let me start by saying that you should not be storing the same data in multiple places. You can probably retrieve the duplicated data quite easily by using a join in a query.

Either use a join in the form's query to show the related data (lock the controls so that this data cannot be updated on this form) or look up Recordset in help. The help entry should have an example of how to open a recordset in code. The third possiblity is DLookUp().
 

Users who are viewing this thread

Back
Top Bottom