S
Sneeper
I'm using the "NotInList" event to open a form in Dialog mode ... is there
some elegant way to pass a value back to the originating code so I know what
the user decided to do?
I'm creating a pedigree database for dogs ... when I'm adding a record to
the Dogs table, one of the fields is the father of the dog, which of course
is just another record in the Dogs table ... when the user hasn't entered the
parents info yet I want to open another copy of the same form using the
NotInList event ... I confirm with the user that it is not a typo and they do
want to enter another dog record ... I then open up a copy of the original
form using the OpenArgs to pass along the name and gender of the parent dog
.... the user then fills out the form and at the bottom can either "Save" or
"Cancel" ... if they Save then I want to set the Response to acDataErrAdded,
if however they decide to Cancel then I should set the Response to
acDataErrContinue. By opening the form in Dialog mode the code in the
original form is suspended until the second copy of the form is closed, but
when it is closed I don't know what the user decided to do.
strTempAddDog = "Sire" & "/+/" & strTempName
DoCmd.OpenForm "frmDogsCreateDialog", acNormal, , , , acDialog, strTempAddDog
Is there some way of passing a value back to this point in the code so I can
then appropriately set the Response value to my NotInList event;
Private Sub Sire_NotInList(NewData As String, Response As Integer)
Any help would be appreciated.
some elegant way to pass a value back to the originating code so I know what
the user decided to do?
I'm creating a pedigree database for dogs ... when I'm adding a record to
the Dogs table, one of the fields is the father of the dog, which of course
is just another record in the Dogs table ... when the user hasn't entered the
parents info yet I want to open another copy of the same form using the
NotInList event ... I confirm with the user that it is not a typo and they do
want to enter another dog record ... I then open up a copy of the original
form using the OpenArgs to pass along the name and gender of the parent dog
.... the user then fills out the form and at the bottom can either "Save" or
"Cancel" ... if they Save then I want to set the Response to acDataErrAdded,
if however they decide to Cancel then I should set the Response to
acDataErrContinue. By opening the form in Dialog mode the code in the
original form is suspended until the second copy of the form is closed, but
when it is closed I don't know what the user decided to do.
strTempAddDog = "Sire" & "/+/" & strTempName
DoCmd.OpenForm "frmDogsCreateDialog", acNormal, , , , acDialog, strTempAddDog
Is there some way of passing a value back to this point in the code so I can
then appropriately set the Response value to my NotInList event;
Private Sub Sire_NotInList(NewData As String, Response As Integer)
Any help would be appreciated.