P
pan65
I have created a form in Microsoft Word and when the command button
cmdDataSwitch is clicked on that form the following code is executed.
Private Sub cmdDataSwitch_Click()
'Open Access and make visible
Set oApp = CreateObject("Access.Application")
oApp.Visible = True
oApp.OpenCurrentDatabase "W:\Dunndatabase.mdb"
oApp.DoCmd.OpenForm "Dunn Switchboard"
End Sub
The code works fine and opens the form Dunn Switchboard. The problem is
that when records are deleted Access does not ask whether or not you want to
delete the record, it just deletes them. When the database is opened a
different way Access does ask about deleting records. How can I modify the
code to get Access to prompt about deleting records, or is there a better way
to code opening the database via microsoft Word and getting Access to prompt
about deleting records?
cmdDataSwitch is clicked on that form the following code is executed.
Private Sub cmdDataSwitch_Click()
'Open Access and make visible
Set oApp = CreateObject("Access.Application")
oApp.Visible = True
oApp.OpenCurrentDatabase "W:\Dunndatabase.mdb"
oApp.DoCmd.OpenForm "Dunn Switchboard"
End Sub
The code works fine and opens the form Dunn Switchboard. The problem is
that when records are deleted Access does not ask whether or not you want to
delete the record, it just deletes them. When the database is opened a
different way Access does ask about deleting records. How can I modify the
code to get Access to prompt about deleting records, or is there a better way
to code opening the database via microsoft Word and getting Access to prompt
about deleting records?