Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not in List broken after Office 2007 upgrade 2

Status
Not open for further replies.

nastar1

Technical User
Nov 1, 2005
122
0
0
US
The NotinList below worked fine under Access 2003, but 2007 now displays a dialog box "Do you want to save changes to the design of the form "frmAddDelTics" and then the form "frmAddDelCust" opens. I can't see anything to correct and I dont understand what is causing the dialog box to ask if design changes are to be saved. Any ideas on how to correct this?

Private Sub UserID_NotInList(NewData As String, Response As Integer)


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

DoCmd.OpenForm "frmAddDelCust", acNormal, , , acFormAdd, acWindowNormal

DoCmd.Close acForm, "frmAddDelTics"


End Sub
 
I think part of your problem is that you are using WAY outdated code to do this and Access doesn't have menu bars anymore.

what happens if you substitute:

DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

with

DoCmd.RunCommand acCmdUndo

or

Me.Undo

 
That was the problem. I've seen nothing in my travels that tipped me off that the code I was using was outdated, but I was not confident it was good logical code to begin with.

Thanks for the assist.
 
FYI the DoMenuItem method is deprecated since ac97 ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top