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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoMenuItem argument from early Access version

Status
Not open for further replies.

toekneel

Programmer
Aug 10, 2001
96
US
I'm working at cleaning up an older version of an Access database (I'm guessing it may have been 7.0 but I'm not certain) and rebuilding it in Access '97. I'm still fumbling my way around with VBA, but I haven't been able to figure out what needs to happen to resolve this issue.

When attempting to compile all the code that was carried over into '97, I have one line that will not compile with a "Variable not defined" message. Here's the command:

DoCmd.DoMenuItem A_FORMBAR, A_RECORDSMENU, A_DATAENTRY

My initial guess is that I need to use VBA's "Tools, References" Menu to choose the proper reference and that would clean it all up, but the original database that I'm trying to build from does not have the ability to see what references are used. I'm not familiar with this command and what it is attempting to do to try to recreate it from a totally different approach within '97.

Anyone been working with Access long enough to help on this one?

Thanks!

Tony
 
There is no updated equivalent for the old Access constant: A_DATAENTRY.

I think all the code is doing is setting the current form to data entry mode, so set the form's DataEntry property to true:

<reference to current form>.DataEntry = True

M :)
 
Finally happened to discover after searching help files in many different ways that if the cursor is on the phrase (A_DATAENTRY) and then F1 is selected, a help item specific to the phrase comes up. That help item indicated that the DoMenuItem command was not available, and other links set the converted command to &quot;DoCmd.DoMenuItem acFormBar, acRecordsMenu, DataEntry&quot; which seems to have set it aright.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top