Solved Navigate to a text box in a sub form to put a value by a button

Hulk009

New member
Local time
Tomorrow, 00:26
Joined
Jun 8, 2024
Messages
17
hello
in my form i have a button when i press it i want it to fill up many text box (RA - MM1 - MM2)
those many text are in a sub form called "TB01"

i've tried this code:

Private Sub Command166_Click()
Me.Parent.Tb01.RA.Value = 27459
Me.Parent.Tb01.MM1.Value = 27894
Me.Parent.Tb01.MM2.Value = 44004
End Sub


it give me Error ... any help with it
 
I think the O/P is just confused?
If the code was in the mainform then Parent would not be used, but .Form should be?
If in the subform, again no need for Parent or subform control name.

From the very little posted I think the button is on the mainform and the textboxes in the subform, so the link should show them the syntax.
 

Users who are viewing this thread

Back
Top Bottom