If then subform and main form

pablotx

Registered User.
Local time
Today, 05:10
Joined
Feb 20, 2003
Messages
79
I am trying to have a label field become visible on the main form when a combo box on a linked form has a certain value. I can make it the action occur if the combo box is on the main form, but when I bring the variable of the subform into the equation, it falls apart.

I read through some earlier posts and they had links to a seemingly helpful webpage for syntax for main/subforms, but I still haven't been able to figure out the problem.

Below is the Event Procedure on the Form Load section of the main form. Main form entitled "Report Log". Subform Entitled "subfrmEntry". The combo box field on the subform is "Entry Complete" and the label on the main form I want to become visible is "labComplete"

Private Sub Form_Load()
If Me!subfrmEntry! Entry_complete .Value = -1 Then
Me.labComplete.Visible = True
Else
Me.labComplete.Visible = False
End Sub

I have also tried:
If Me!Forms!Report_Log.subfrmEntry.Form!Entry_Complete = -1 Then

Any help would be appreciated.
 
One more thing to make this potentially more difficult. The main form that I want the label to appear on is a continuous form. Essentially just a long Excel like lists (log). I only want the complete label to appear on each specific record that is indicated on the linked field as being complete.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom