Command button functions on two sep. forms

vX987

Registered User.
Local time
Today, 06:12
Joined
Jun 29, 2007
Messages
51
Hello. I have a MAIN form with some patient records in it. What I want to do is insert a command button into this MAIN form that will result in adding a new record to that form (MAIN).

HOWEVER, what I want to happen FIRST before I am even directed to creating a new record is...... to have it open a separate form (which will play as a pop up form) that will say: Would you like to create a new record for _______________ (the underline part will automatically appear the patients name that was in the MAIN form). There'll be a YES and NO button.

If YES, then it will redirect me back to the MAIN form; opening up a new record for me to input information.
If NO, then it will redirect me back to the MAIN form... in general, the NO command button will just be a funtion to close the popup form.

Is this possible?? If so, I'd appreciate some help and suggestions.

THANK YOU!!!!!
 
Something like:

Code:
dim strPartMsg as string
strPartMsg = "Create new record for pn " & me.myPartNumberField & "?"

If MsgBox(strPartMsg, vbYesNo + vbQuestion, "New Part Record") = vbYes Then
        Create record code
end if

???
 

Users who are viewing this thread

Back
Top Bottom