Can a form have two record sources ?

  • Thread starter Thread starter Roger Ottaway
  • Start date Start date
R

Roger Ottaway

I want to have a form with an overview of data from 4 different queries.
How can I have different record sources (ie different query fields) on the
same form ?

thanks

Roger
 
Roger Ottaway said:
I want to have a form with an overview of data from 4 different queries.
How can I have different record sources (ie different query fields) on the
same form ?

thanks

Roger

You cannot. Use subforms or artificial stuff.

-d
 
Roger said:
I want to have a form with an overview of data from 4 different
queries. How can I have different record sources (ie different query
fields) on the same form ?

thanks

Roger


It depends on the Table relationships but it is possible to create a
Query that contains Fields from several other Queries.

Otherwise you may be into Subforms and/or Forms on the pages of a tab
control.

hth

Hugh
 
Thanks ... I have tried a query but get crazy results ...

I have 3 tables, one for each of customer, costs and payments. The costs and
payment transactions in the respect tables are linked to customer via the
customer ID. no problems.

With the query, if i have customer and costs, i can list all costs for the
particular customer no problems, but as soon as i link payments in there to
list payments as well i get datarecords repeated over and over again! what
am I doing wrong ?

thanks for your help

roger
 
Roger said:
Thanks ... I have tried a query but get crazy results ...

I have 3 tables, one for each of customer, costs and payments. The
costs and payment transactions in the respect tables are linked to
customer via the customer ID. no problems.

With the query, if i have customer and costs, i can list all costs
for the particular customer no problems, but as soon as i link
payments in there to list payments as well i get datarecords repeated
over and over again! what am I doing wrong ?

thanks for your help

roger


May I suggest you forget about having separate Tables for costs and for
payments. My guess is they contain the same sort of data anyway -
Date, Amount, Reference etc. If you use one Table for these
Transactions, you just need an extra Field to say what kind of
transaction it is. This will then cope with other Transaction types
you have probably not yet thought of!

You will then have a one-to-many relationship between the Customer
Table and the Transaction Table and a very simple Form/Subform setup.
This should use an Autonumber as the unique indexed primary key in the
Customer Table, linked to a Long Integer foriegn key Field in the
transactions table with referential integrity enabled. You will need
to keep these invisible to users, of course.

hth

Hugh
 
You use sub forms to do this.

(you are aware of sub forms right?).

Sub forms are one of the best features in ms-access. The do wonders and work
miracles for you.

Sub forms will automatically manage, display,a and even let you edit all of
the one to "many" relations you have in your data bays.

Thus, base your form on the "parent" table,a and all of the child tables can
be a sub-form. Those sub-forms will even display the correct info for you.
you don't have to make a query or anything...it is the way ms-access works.

Check out my thoughts on sub forms:
http://www.attcanada.net/~kallal.msn/Articles/fog0000000005.html
 
Back
Top