Form - Two tables

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi

I am using Windows XP, and Access 2000.

I am trying to create a form that includes fields from two tables.

In other words, the form has two text boxes that must display data from one
field in one table and one field in another table.

I've been trying for ages to make this work.

Thank you for your help in advance.

Richard
 
Hi Richard,

There's not a lot of detail in your question, so here's a general answer:

A form can only be bound to a single recordsource (table or query). If you
want/need to display fields from two separate tables, you will need to join
those tables in a query, and base your form on the query. Note that,
depending on exactly how your tables are related, the query may be a
non-updateable query - meaning that you cannot add or edit records within
the query (and hence in the form).

In some cases, you may be able to use a textbox control on your form which
contains a dLookup expression to retrieve and display (not edit) data from a
table which is not the recordsource of the form.

HTH,

Rob
 
Thanks Rob

I will try to create a query for the form to be based on.

The fact that the form can only be bound to a single recordsource is helpful.

Richard
 
Thanks Rob

I will try to create a query for the form to be based on.

The fact that the form can only be bound to a single recordsource is helpful.

You can have a subform in your form with its own recordsource (Just drag
the form into another form). Or your record source could have two linked
tables.

Help us out. Tell us more about what you are doing.
 
Thanks Avid Fan

The database is used to record training.

At the moment, there are two tables, Waiting List and Schedule.

There are 2 forms, the main form with the main details, ie name, phone
number, course, course date etc. The second form is where new delegates are
entered or amended.

I wanted both forms to be able to display fields from both tables.

I have managed to do this now using a query with a join.

I do have another problem now though, which I have just posted.

Thanks again. Hope this makes it a bit more clear.

Richard
 
Back
Top