Database doesn't ask about deleting records

G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top