Sub Forms Problem 2

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sandra helped with my last problem about 2 hours ago then I stumbled into
another problem.

My main form with 3 sub forms. I have an option group on sub form 2.
Depending what that answer it Enable's fields on sub form 3. I cannot get the
correct syntax to the text field on sub form 3. Here is what I got that is
not working.

Private Sub Frame42_AfterUpdate()

If Me.Frame42.Value = 1 Then
Me!tblEnd.Form!RespondingTech.Enabled = True
Else
Me!tblEnd.Form!RespondingTech.Enabled = False
End If

End Sub

Main form Name: frmaaMain
Subform 2: tblStart
Subform 3: tblEnd
Text box on Subform 3: RespondingTech

Thanks again everyone.

Michael
 
When you refer from one sub form to another, you need to specif the full path

Forms![MainFormName]!tblEnd.Form!RespondingTech.Enabled = True

Now, you can replace the If Statement with

Forms![MainFormName]!tblEnd.Form!RespondingTech.Enabled = (Me.Frame42.Value
= 1)
 
Thank you Ofer,

I got along way to go and I apprieciate the help I recieve from this fourm
and people like you.

Michael
 
The following has a lot of good syntax examples that you might find useful,
even if it doesn't fit your situation exactly:

http://www.mvps.org/access/forms/frm0031.htm
Refer to Form and Subform properties and controls

HTH,
--
George Nicholson

Remove 'Junk' from return address.


Procyan said:
Thank you Ofer,

I got along way to go and I apprieciate the help I recieve from this fourm
and people like you.

Michael

Ofer said:
When you refer from one sub form to another, you need to specif the full
path

Forms![MainFormName]!tblEnd.Form!RespondingTech.Enabled = True

Now, you can replace the If Statement with

Forms![MainFormName]!tblEnd.Form!RespondingTech.Enabled =
(Me.Frame42.Value
= 1)
 
Back
Top