G
Guest
Hello,
I have a main form with events and a subform with bookings
for each event. There's a button on the main form to add a
new person's details which opens up a dialog form. A
button on this dialog runs and event procedure which saves
the new details and assigns the values to the booking
subform, but if the 'current record' is not a new one (ie
the cursor was in an existing booking record) then that
record gets overwritten with the new details. I've tried
using the GoToRecord method to make a new record active
before assigning the values to the booking subform:
DoCmd.GoToRecord acDataForm, "FrmIndAttendSub", acNewRec
but I keep getting a message saying that the subform isn't
open even though it obviously is (I've tried a macro as
well but get the same result).
I've also tried using GoToControl to make the subform
active (the Immediate Window tells me that the main event
form is the active one at this point in this event
procedure). IsOpen doesn't seem to work during debuging
and trying IsLoaded alwys seems to return False (for any
form name).
Yours frustratedly
Sue
I have a main form with events and a subform with bookings
for each event. There's a button on the main form to add a
new person's details which opens up a dialog form. A
button on this dialog runs and event procedure which saves
the new details and assigns the values to the booking
subform, but if the 'current record' is not a new one (ie
the cursor was in an existing booking record) then that
record gets overwritten with the new details. I've tried
using the GoToRecord method to make a new record active
before assigning the values to the booking subform:
DoCmd.GoToRecord acDataForm, "FrmIndAttendSub", acNewRec
but I keep getting a message saying that the subform isn't
open even though it obviously is (I've tried a macro as
well but get the same result).
I've also tried using GoToControl to make the subform
active (the Immediate Window tells me that the main event
form is the active one at this point in this event
procedure). IsOpen doesn't seem to work during debuging
and trying IsLoaded alwys seems to return False (for any
form name).
Yours frustratedly
Sue