Form design wizard won't separate fields from form and subform

S

scubadiver

I have two tables that have a 1-to-many relationship. When I went through the
form wizard to design my main form, I got to the step that shows the fields
from the "one" side in the main box and the fields from the "many" side in
the subform box.

I am doing the same again but this time I have inserted the fields I want
from each table into a query and filtered the records that I would like. When
I go through the form wizard again, for some reason it won't separate the
fields from the two tables into a form and subform. The wizard produces one
form and the records from the "one" table are replicating as many times as
there are records for the respective "many" table.

I hope this makes sense amd someone understands this query. What could be
wrong.

cheers
 
K

Klatuu

Since you have one query, the wizard is assuming this will be a single record
source. A form and it's subform have different record sets. You need a
query for each table.
 
S

scubadiver

Guess what? that has just occurred to me. duh!

:

Since you have one query, the wizard is assuming this will be a single record
source.
 
S

scubadiver

I am halfway there.

I do have another problem. In the query I have the following restriction on
the date:
=DateAdd("ww",-3,Date()) And <DateAdd("ww",-1,Date())

It works ok in the query, but in the form it is still producing a record for
every week.
 
K

Klatuu

Where in the form do you have it?

scubadiver said:
I am halfway there.

I do have another problem. In the query I have the following restriction on
the date:


It works ok in the query, but in the form it is still producing a record for
every week.
 
S

scubadiver

The restriction is in the query. Do I have to put it in the form instead?
Whereabouts would it go?
 
K

Klatuu

it should be okay in the query. Are you saying when you run the query by
itself it works, but when you use it a a record source it does not work?
 
S

scubadiver

that is correct. I have the records I want in the query but in the form I get
every record for every employee!
 
S

scubadiver

I have "employeeID" set up as the primary key and this field is in the
properties box for the master and child fields.
 
K

Klatuu

Sorry scuba, I think my tank just went dry. Without it in front of me to
tinker with, I don't see the problem.
 
Top