I've got DB which tracks Events and Contacts; i.e. contacts and the events they attended, and events and the contacts who
I based this form off of the Students DB Template Microsoft provides. I have 2 data forms, 'Contact Details' and 'Event
Details', which the user can open, look at data directly about that, say, contact (like address, phone, etc), and also click
on a tab to view a subform datasheet of all events the person has attended. Same setup for Events and a tab for all
In both forms, a SELECT DISTINCT query runs off of the EventID or ContactID rowsource in the datasheet which allows the user
to select events or contacts, respectively, that are already in the DB and add them to that list.
My issue is this: in the Contact Details form, if you go to enter into the events subform datasheet a NEW record (a new event
not in the DB yet), a window prompts you saying this record is not in the DB and do you want to enter a new record. If you
click YES, it opens the 'Events Details' to a new, blank form and you can enter away.
This is the code under the On Got Focus for this subform:
Condition- [Screen].[ActiveForm].[Name]=[Form].[Name]Action- Requery
This is under On Dbl Click:
Arguments-Events Details, Form, , ="[ID]=" & [Screen].[ActiveControl], , Dialog
I've copied the same form for my 'Events Details' subform, to select contacts from the existing DB in order to track
who was at the event the same way as above for contacts. So, I followed the same kind of setup as the 'contact details'
subform, but changed the code under On Dbl Click to:
Arguments-Contact Details, Form, , ="[ID]=" & [Screen].[ActiveControl], , Dialog
I get the prompt that the record is not in the DB, but it doesn't open a new, blank contact detail form. Do I need to
change something else? I'm not sure where to go from here. Everything else about this form is working properly, just not
this. I'm not sure how the [Screen].[ActiveControl] command works or what it is trying to call.
I'm using Access2007 and Windows XP.