Unable to locate subform error message-not a misspelling

CarlyS

Registered User.
Local time
Today, 03:48
Joined
Oct 9, 2004
Messages
115
I am trying to use setfocus to move from the last field of the first subform to the first field of the next subform. I get an error message that says it is unable to locate my second subform. I have checked that spelling is correct. Why else would I get this message? Thanks in advance!
Carly
 
That link is very helpful to me, since I am extremely unfamiliar with using code. I am still having trouble, however, with this one argument.

I am trying to tab from the last control on subformA to the first control on subformB, where subforms A and B are both subform controls on the mainform. Here is what is not working. I have this code in the on lost focus event of the last control on subformA.

Private Sub Staff_LostFocus()
DoCmd.GoToControl Mainform!SubformB!FirstControl
End Sub

The link specifies reference to a subform with another subform on it. My situation is for two subforms side by side on the main form. I should be able to make the necessary adaptations, but such is my learning curve apparently. What am I doing wrong?

Thanks again,
Carly
 

Users who are viewing this thread

Back
Top Bottom