VBA Compatibility: Access 2000 vs. Access 2002

G

Guest

Hello,

I just "inherited" a system written in Access 2000. A user had their Office
upgraded to Office 2002, and the following command to place a screen in
subform datasheet view, no longer works:

DoCmd.DoMenuItem A_FORMBAR, 2, 3, , A_MENU_VER20

I tried using the following command, which DOES work in Access 2000, but
still not in Access 2002. Any ideas what command is compatible with both
Access 2000 and Access 2002?

DoCmd.RunCommand acCmdSubformDatasheet

Thanks,
 
G

George Nicholson

DoCmd.RunCommand acCmdSubformDatasheet

Works for me in 2000 & 2002 *as long as* the control containing the subform
has been given focus before executing the line.

HTH,
 
G

Guest

Thanks George.

As the new command worked in 2000, can we assume the FOCUS had to be set for
2000?
 
G

George Nicholson

As the new command worked in 2000, can we assume the FOCUS had to be set
for
2000?

Well, I can't imagine that
DoCmd.RunCommand acCmdSubformDatasheet
would work unless a subform has the focus. But it is possible that 2000 was
more forgiving (maybe searching the current form for a subform) than XP. I
don't know. That is just a guess.

Assuming that focus is necessary certainly won't break anything.

HTH,
 

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