J
Judy
I'm trying to set the control source of several text boxes in a
subreport based on information from a form. After researching on this
forum, I learned that needed to add the following code to verify it is
the first time the form is loading.
Static Initialized As Boolean
If Not Initialized Then
Me.textbox.ControlSource = whatever
Initialized = True
End If
End Sub
This work to just set the control sources, but when I add the logic to
decide what to set the control sources to, i get the original message
about not being able to set the control source in print preview mode
etc. I put the logic after the If statement:
Static Initialized As Boolean
If Not Initialized Then
If(Forms![Lock]![FP] < 0) Then
Me.TextBox.ControlSource = "=[Forecast]"
End If
Initialized = True
End If
End Sub
Thanks, Judy
subreport based on information from a form. After researching on this
forum, I learned that needed to add the following code to verify it is
the first time the form is loading.
Static Initialized As Boolean
If Not Initialized Then
Me.textbox.ControlSource = whatever
Initialized = True
End If
End Sub
This work to just set the control sources, but when I add the logic to
decide what to set the control sources to, i get the original message
about not being able to set the control source in print preview mode
etc. I put the logic after the If statement:
Static Initialized As Boolean
If Not Initialized Then
If(Forms![Lock]![FP] < 0) Then
Me.TextBox.ControlSource = "=[Forecast]"
End If
Initialized = True
End If
End Sub
Thanks, Judy