Trouble getting a subform to allow data entry

  • Thread starter Thread starter CDM
  • Start date Start date
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?
 
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.
 
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?
 
Back
Top