**
if anyone is still following this thread - especially MVPs - and has any
comments on the following, i'd be glad to see them because i'm completely
confounded. <g>
**
well, Jim, i worked on your db for nearly three hours. i got it fixed in
about an hour, then spent the next two hours trying to duplicate the fix -
but i couldn't! it's the darnedest thing i've ever seen.
i started out by reviewing your forms. i found that when the main form is
initially opened, the subform's DataEntry setting is True, and the subform
behaves as expected. when you move to another record in the main form, the
subform's DataEntry setting changes to False, and stays that way until the
form is closed. i couldn't find any settings or code that might cause the
problem. thinking one of the forms might be corrupted, i created new forms
and copied/pasted the objects, and duplicated the settings. no joy.
in your database, Name AutoCorrect is turned on. i turned it off and
compacted/repaired. no joy. that option is sometimes hard to "shake off", so
i created a new database, immediately turned off Name AutoCorrect,
compacted/repaired, and imported the objects from your db, including the new
forms i had created. no change.
i imported the "test" table/form/subform setup i had used before answering
your original post. they worked, but your tables/forms didn't. thinking that
perhaps one of your tables might be corrupted, i created new blank tables
and copied/pasted all the fields from your tables. then dumped the data from
your tables into the new ones. tested your forms again, and also the new
forms i'd earlier built. no luck.
i built copies of your tables from scratch, using proper naming conventions,
setting Subdatasheet to [None}, creating a primary key field for table
TimeClock (which your original table doesn't have), and setting the
relationship in the Relationships window. i created new forms based on the
new tables, and they worked! so i tried tweaking your forms to run with the
new table/field names - *now* they worked!
okay. so i figured Access didn't like something specific about your
table/field settings. i set about changing one thing at a time in your
tables, to match "my version" of your tables, then testing your forms (with
the single change supported). if a change didn't make the forms work, i
changed it back, and then went on to the next thing.
in the end, your forms worked when all i changed in your tables was adding
the primary key field to table TimeClock. so i should be able to duplicate
the fix by opening an untouched copy of your db, and adding a primary key
field to table TimeClock. but this time, your forms didn't work. so i tried
creating a new db, turning off Name AutoCorrect, compacting/repairing,
importing all the objects from the untouched copy of your db, and adding the
primary key field to table TimeClock. still no joy.
no matter what i tried, i was not able to duplicate the fix i achieved. so i
have to say it beats the heck out of me exactly what was wrong, or exactly
how i fixed it. but i did email a copy of your db back to you with the
working tables/forms. hopefully they'll still work when you get them.
if they don't, you can *force* the subform to hold the DataEntry setting by
adding a single line of code to the main form's Current event, as
Private Sub Form_Current()
Me!TimeClockInData.Form.DataEntry = True
End Sub
hth