data entry in subform.if empty no place for dataentry

G

Guest

well i have two table and they have one to many relationship...
i am using access forms(form and a subform) for dataentry and after
completion of dataentry, data validation is done. i m doing this while
setting my form to allowedits=false.
now if i want some data to be edited i set allowedits = true with a command
button.
but if such scene comes when parent table contains value but its child table
is empty then nothing shows in subform(which is bound to child table).
So if i want to enter data into the subform what should i do?
Note: the subform view by default is set to datasheetview
 
A

Allen Browne

The Detail section of a form goes completely blank if:
a) There are no records to display, and
b) No new record can be added.
You can demonstrate this with any form by setting Data Entry to Yes (so no
existing records show) and Allow Additions to No (so new records cannot be
added.)

To fix the problem, leave the AllowAdditions property as Yes. Instead,
cancel the BeforeInsert event of the form to block new records.
 
G

Guest

Thanks Very Very Much.It Worked Perfect

Allen Browne said:
The Detail section of a form goes completely blank if:
a) There are no records to display, and
b) No new record can be added.
You can demonstrate this with any form by setting Data Entry to Yes (so no
existing records show) and Allow Additions to No (so new records cannot be
added.)

To fix the problem, leave the AllowAdditions property as Yes. Instead,
cancel the BeforeInsert event of the form to block new records.
 

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