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!

debug step into code, docmd.gotocontrol in the way 2

Status
Not open for further replies.

sub5

Programmer
Oct 12, 2005
104
Hi,
as I'm debugging in Access97, when I step into the code whenever I come to a line docmd.gotocontrol xyz the message command not available appears and I have to end the code.

Is there a way to step over this line or do something so I don't loose the flow of stepping through?
 
Can you REM it out just for the debugging?

Add ' in front of the line (and I usually add a comment so I'll know to put it back, so my line would look like this:

' Put this line back when done
' DoCmd.GoToControl xyz



Good luck!
 
Yea, that's what I had been doing, just got tired of the faf!
 
Stop using the gotocontrol method replace with setfocus.
You can also use the SetFocus method to move the focus to a control on a form or any of its subforms, or to a field in an open table, query, or form datasheet. This is the preferred method for moving the focus in Visual Basic, especially to controls on subforms and nested subforms, because you can use the full syntax to specify the control you want to move to.
 
search and replace here I go, cheers majp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top