Can't open subform for Data Entry

L

Leslie

I have a tab control with a a sub form which has a
one-to-many relationship (one record on the tab control,
many potential records on the sub form linked by an invoice
number). I have used this configuration for adding records
on other projects before with no problems viewing the first
available record on the sub form, and it was always
succesful, but in this project I can't seem to get the form
to open with the subform data entry page viewable. I think
that the main difference between the projects is that now I
am trying to connect the records using a primary key that
is being generated through code in the AfterUpdate event of
the first data entry field (previously the primary key was
always generted by Access using an autonumber field). It
is not possible to use an autonumber method now because the
majority of the data is imported into the database using
number sequences I have little control over (but some new
records need to be entered manually, with unique invoice
numbers). I have tried numerous times to set the
properties on the subform to AllowEdits = Yes,
AllowDeletions = No, AllowAdditions = Yes, Data Entry = No,
and I can view the subform if I set those properties at
runtime, but every time I close the main form and re-open
it I find all of those settings have reverted to = NO. I
have tried passing the invoice number to the sub form as
soon as it is generated in the main form, but it appears
that the sub form can not accept the data from the main
form. How can I set the sub form so that it is viewable
for data entry as soon as the main form is opened (or as
soon as the main form has a new invoice number)?
Thanks in advance.
Leslie
 

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