[AccessD] x posted Get name for message box

Steve Conklin (Developer@UltraDNT) Developer at UltraDNT.com
Sat Nov 20 22:40:42 CST 2004


"You have chosen to delete " & Me.FirstName & " " & Me.LastName & "!"
-- substituting your control names for first & last name

Hth
Steve


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Hecht
Sent: Saturday, November 20, 2004 11: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