Trouble getting a subform to allow data entry

C

CDM

I have a main form bound to a table whose primary key is named [timestamp]
and the default value is now(). I have added a subform bound to another table
with two primary keys, [Timestamp] and [Customer_Id]. The master link and
child link properties are set on TimeStamp. When I bring up the main form,
its TimeStamp field is filled in with the default value. [TimeStamp] in the
subform is hidden, but when I enter the customer_id in the subform, I get an
error that says "A related record is required in the [main table]." Why isn't
Timestamp in the subform automatically filled-in with a value from the main
form?
 
G

Golfinray

Mainform and subform is usually designed to work from one table, and in a
one-to-many format. One doctor, many patients. When that happens,
mainform/subform works well. You are trying to do that from TWO tables. You
need to combine the two tables in one query and then create your form.
 
C

CDM

sometimes you wonder when all of this is going to start sinking in.

Golfinray said:
Mainform and subform is usually designed to work from one table, and in a
one-to-many format. One doctor, many patients. When that happens,
mainform/subform works well. You are trying to do that from TWO tables. You
need to combine the two tables in one query and then create your form.

CDM said:
I have a main form bound to a table whose primary key is named [timestamp]
and the default value is now(). I have added a subform bound to another table
with two primary keys, [Timestamp] and [Customer_Id]. The master link and
child link properties are set on TimeStamp. When I bring up the main form,
its TimeStamp field is filled in with the default value. [TimeStamp] in the
subform is hidden, but when I enter the customer_id in the subform, I get an
error that says "A related record is required in the [main table]." Why isn't
Timestamp in the subform automatically filled-in with a value from the main
form?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top