[AccessD] x posted Get name for message box

Joe Hecht jmhla at earthlink.net
Sat Nov 20 22:28:14 CST 2004


I have the following code for the on click event of a form. I want to
replace " this employee " with the current employee name on the form.

 

How do I do that?

 

Private Sub cmdDelEmp_Click()

    ' Comments  Confirm Employeee Deletion:

    ' Parameters:  -

    ' Modified  :

    Dim lngRetval As Long

 

    lngRetval = MsgBox( _

        "You have chosen to delete this employee!" & vbCrLf & "" & vbCrLf &
"Do you wish to continue?", _

        vbYesNoCancel + vbQuestion + vbSystemModal + vbDefaultButton1, _

        "Confirm Emplyee Deletion")

 

    Select Case lngRetval

        Case vbYes

             DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70

             DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

        

        Case vbNo

        Case vbCancel

    End Select

    '

    ' -------------------------------------

    

  

    

Exit_cmdDelEmp_Click:

    Exit Sub

    

Err_cmdDelEmp_Click:

    MsgBox Err.Description

    Resume Exit_cmdDelEmp_Click

    

End Sub

JOE HECHT

LOS ANGELES CA 

jmhla at earthlink.net

 




More information about the AccessD mailing list