[AccessD] deletion of record from popup

Charlotte Foust cfoust at infostatsystems.com
Tue Nov 29 18:04:19 CST 2005


Surely you aren't still using Access 2??  All that code appears to do is
this:

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

Where is the code?  It needs to be on the form that contains the record,
since you can't select the current record from another form  with that
code.

Charlotte Foust


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Eget
Sent: Tuesday, November 29, 2005 3:45 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] deletion of record from popup



I have a displayed record (in edit mode) and display a popup when the
delete command button asks the question. Are you sure?.  Popup created
and code for Yes Command Button is below.  But nothing happens. Does
anyone have an example or know what I am doing wrong? 

On Error GoTo Err_Delete_Record_Click


    DoCmd.DoMenuItem A_FORMBAR, A_EDITMENU, A_SELECTRECORD_V2, ,
A_MENU_VER20
    DoCmd.DoMenuItem A_FORMBAR, A_EDITMENU, A_DELETE_V2, , A_MENU_VER20

Exit_Delete_Record_Click:
    Exit Sub

Err_Delete_Record_Click:
    MsgBox Error$
    Resume Exit_Delete_Record_Click
-- 
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