View Full Version : queries for forms


ajaymansata
01-09-2002, 09:48 PM
Hi all
I have a table called personal table in which i have id as a primary key.I have another table called finance_records which has id as the foreign key.Now i want to have a query which has the folloing fields
Id(from personal table)
lastname(from personal table)
firstname(from personal table)
year (from finance_records)
funds(from finance_records)
Now after creating a query in design view i would like to create a form which has all the fields from this query (as a subform) to a main form for table personaltable(personal table has other fields tooo)
the problem i face is that
when i try to enter data in the form i a cannot do it.It gives me a problem sayin that join is not proper.(something of that sort)
I want to know that what i am doin is it right or wrong.
Basically i would like to create a form involving one Table and One query.
Ajay Mansata

SteveA
01-09-2002, 11:03 PM
Rather than having the recordsource of your main form trying to gather all the information, I would set the recordsource of the main form to your personal table. I would add a subform to the main form and set the recordsource to the finance_records table. You can then set the Link Child Fields and Link Master Fields to id.

By doing this your personal information will appear in the main form, and all the financial details for the displayed person will appear in the subform.

I hope this helps.

Cheers
SteveA http://www.access-programmers.co.uk/ubb/smile.gif

ajaymansata
01-09-2002, 11:17 PM
hi steve.Thanks a lot.
what i want to know is that if i add child link field and master link field to id i hope it is not necessary to have the id field on the subform also.

Rich
01-10-2002, 04:19 AM
You need the common ID field on both forms, however you can hide either or both.
HTH

Pat Hartman
01-10-2002, 05:14 AM
You don't need to place the common Id on EITHER form. It simply needs to be in each form's recordsource.