A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form - Two tables



 
 
Thread Tools Display Modes
  #1  
Old April 4th, 2010, 07:41 AM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Form - Two tables

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
  #2  
Old April 4th, 2010, 08:51 AM posted to microsoft.public.access.forms
Rob Parker[_4_]
external usenet poster
 
Posts: 30
Default Form - Two tables

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

"Richard" wrote in message
...
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


  #3  
Old April 4th, 2010, 11:00 AM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Form - Two tables

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

"Rob Parker" wrote:

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

"Richard" wrote in message
...
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


.

  #4  
Old April 4th, 2010, 12:13 PM posted to microsoft.public.access.forms
Avid Fan
external usenet poster
 
Posts: 30
Default Form - Two tables

On 4/04/2010 8:00 PM, Richard wrote:
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.



Richard

"Rob Parker" wrote:

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

wrote in message
...
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


.


  #5  
Old April 4th, 2010, 01:12 PM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Form - Two tables

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

"Avid Fan" wrote:

On 4/04/2010 8:00 PM, Richard wrote:
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.



Richard

"Rob Parker" wrote:

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

wrote in message
...
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

.


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.