Refer to a table value though form

dealwi8me

Registered User.
Local time
Today, 20:32
Joined
Jan 5, 2005
Messages
187
How can i refered to a table value through a form?

Thank you!
 
Hi,

Set the form's Record Source to the table. Then open the Field List on the form, and drag the field(s) you want onto the form. Or, create a text box control on the form, and set its Control Source to the name of the field you want, from the table.

HTH,
Keith.
 
i have already set the Record Source to another table but i want to use some values from more than one tables.

Is there another way to do this?
 
Change the record source to reference both tables. You can click on the (...) symbol beside the record source to open a graphical view of the table you set as the record source. Add your other table to the record source.

If your database is well designed, there will probably be one or more fields in one table (primary key) that match some fields in the other table (foreign key). Create a join between these fields (you can drag one field from one table onto the corresponding field of the other table).

Double-click the field you want from the other table, to add it to the record source. When you return to your form, you should now find the new field is available in the Field List.

Keith.
 
but when i do this i can't write to the fields at my form. :confused:
 
Hi,

Have a look at the Help topic "When can I update data from a query?" You might be able to make the record source updateable by including more fields from the other table, i.e. its primary key fields.

An alternative way is to make the field unbound, and set it to a value using VBA code on the Form's open event, or other event as appropriate. Your VBA code will need to run a query to retrieve the value you want. And another to update if the user changes the value!

Keith.
 

Users who are viewing this thread

Back
Top Bottom