I would like to define a screen as popup ..but this prevents me from deleting the current record that is on the form.
How can I get around this without permanently defining the form as popup = no
Access 97 Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
Thanks for your response Robert !
The delete button is on the popup form. The user may decide they want to delete the record while on the form. Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
I get err 2046:
The command or action "SeclectRecord" is not available now
"You may be in a read only dataqbase" - I'm ok here
"The type of object the action applies to isn't curently seleted or in the active view
Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
You might want to use the following code. This code does not care about the current view of your screen. It does assume you want to delete the record on the form that currently has the focus.
'---------------------------------------------------------------------------------------
' Procedure : Delete_click
' DateTime : 10/3/2002 10:19
' Author : bermanr
' Purpose : Deletes record at current record mark
'---------------------------------------------------------------------------------------
'
Private Sub Delete_click()
On Error GoTo Delete_click_Error
Dim rs As DAO.Recordset
Dim bkm As Variant
bkm = Me.Bookmark
Set rs = Me.RecordsetClone
rs.Bookmark = bkm
rs.Delete
rs.Close
Set rs = Nothing
Me.Requery
On Error GoTo 0
Exit Sub
Delete_click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & " in procedure Delete_click of Module Module1"
End Sub
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.