Greetings, im having a bit of issues coding this correctly. I keep getting variable not defined error. The theory is I click on a button and if the (status) field = "NEW", then it opens my search form (frmFileSearch), sets THAT status field (cbostatus) to "NEW" and runs the search button (cmdFilter_Click) to populate the results.
This is the code I got so far.
Code:
Private Sub Command2_Click()
If Status = "NEW" Then
DoCmd.OpenForm "frmFileSearch", acNormal
frmFileSearch.cboStatus.Value = "NEW"
frmFileSearch.cmdFilter_Click = True
frmFileSearch.cmdFilter_Click = vbClick
End If
End Sub
im sure im missing something basic! Thank you in advance