I'm trying to make a control that isn't functional in a particular situation invisible so an erroneous result won't occur if it is used.
It's on a pop-up form called GA Tracking (I know spaces are anathema!) and it's called Combo30. It also has a label next to it to make invisible. I can't seem to get the syntax right. Her's the overall code from GA Tracking button OnClick event:
Private Sub GATrackingOpen_Click()
On Error GoTo Err_GATrackingOpen_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "GA Tracking"
stLinkCriteria = "[Payee ID]=" & Me![Payee ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me![Gift Aid Tracking]Combo30.Visible = False
Exit_GATrackingOpen_Click:
Exit Sub
Err_GATrackingOpen_Click:
MsgBox Err.Description
Resume Exit_GATrackingOpen_Click
End Sub
I know I'm probably way off, but could someone "throw me a line" - of code that is?!
Thanks.
Ted.
It's on a pop-up form called GA Tracking (I know spaces are anathema!) and it's called Combo30. It also has a label next to it to make invisible. I can't seem to get the syntax right. Her's the overall code from GA Tracking button OnClick event:
Private Sub GATrackingOpen_Click()
On Error GoTo Err_GATrackingOpen_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "GA Tracking"
stLinkCriteria = "[Payee ID]=" & Me![Payee ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me![Gift Aid Tracking]Combo30.Visible = False
Exit_GATrackingOpen_Click:
Exit Sub
Err_GATrackingOpen_Click:
MsgBox Err.Description
Resume Exit_GATrackingOpen_Click
End Sub
I know I'm probably way off, but could someone "throw me a line" - of code that is?!
Thanks.
Ted.