Form and subform

piWer

New member
Local time
Today, 21:30
Joined
May 6, 2004
Messages
8
I have simple problem, and cannot solve it ;/
.... Typical situation.. i Have a FORM and SUBFORM(xxxx). Subform is divided into Pages. And i want to make button change pages, but it is placed on the FORM. What code to do to make this work ??

Private Sub button123_Click()

me.xxxx.form.gotopage 1

End Sub

Why this code doesn`t work?

and with statement alse not working:
Private Sub button123_Click()

with me.xxxx
docmd.gotopage 1
end with

End Sub

Maybe with Forms! method but how??
 
Is your subform using the tab control? Or page breaks?
 
dcx693 said:
Is your subform using the tab control? Or page breaks?
...Page breaks
 
Sorry, I've never worked with page breaks. I tried quickly to find a method, but I couldn't. Hope someone else will be able to help you.
 
Anyone else??? :(

Maybe there is possibility to make button on the FORM execute code from button on the SUB FORM ??
 
You have to set focus to the subform first and then the page you want
MySubControl.SetFocus
MyPage.SetFocus
 

Users who are viewing this thread

Back
Top Bottom