[AccessD] x posted Get name for message box

Joe Hecht jmhla at earthlink.net
Sat Nov 20 23:05:39 CST 2004


Thanks Steve,

Gotta love these lists

New problem: How do I get related records in other tables?

JOE HECHT
LOS ANGELES CA 
 jmhla at earthlink.net

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Hecht
Sent: Saturday, November 20, 2004 8:28 PM
To: 'Access Developers discussion and problem solving'; 'ACCESS-L'
Subject: [AccessD] x posted Get name for message box

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

 

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list