T
Tim McD
I have a form that loads from different subforms. I use a combo box in one
case. However when I load the form from that combo box I what certain boxes
not to be visible on the loaded form. I'm using the afterupdate event to
load the form from the combo box. What code so I need to make these boxes
not visible after the form loads. I get an error as it loads that is cant
find the referred field in the expression.
rivate Sub cboSelectProject_AfterUpdate()
On Error GoTo Err_cboSelectProject_Click
Dim stDocName As String
stDocName = "frmProjectIndex"
stLinkCriteria = "[ProjectNumber]=" & "'" & Me![cboSelectProject] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Form![frmprojectindex]![cboVeiwAProject].Visible = False
Exit_cboSelectProject_Click:
Exit Sub
Err_cboSelectProject_Click:
MsgBox Err.Description
Resume Exit_cboSelectProject_Click
End Sub
I know this must be simple I'm just not seeing it.
Thanks for the help
Tim
case. However when I load the form from that combo box I what certain boxes
not to be visible on the loaded form. I'm using the afterupdate event to
load the form from the combo box. What code so I need to make these boxes
not visible after the form loads. I get an error as it loads that is cant
find the referred field in the expression.
rivate Sub cboSelectProject_AfterUpdate()
On Error GoTo Err_cboSelectProject_Click
Dim stDocName As String
stDocName = "frmProjectIndex"
stLinkCriteria = "[ProjectNumber]=" & "'" & Me![cboSelectProject] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Form![frmprojectindex]![cboVeiwAProject].Visible = False
Exit_cboSelectProject_Click:
Exit Sub
Err_cboSelectProject_Click:
MsgBox Err.Description
Resume Exit_cboSelectProject_Click
End Sub
I know this must be simple I'm just not seeing it.
Thanks for the help
Tim