Jakboi
Death by Access
- Local time
- Yesterday, 21:57
- Joined
- Nov 20, 2006
- Messages
- 303
Hello,
I have a search function for my database. I put in the search criteria and matching criterian open in a new window. I would like to add a sub form to this and have the results open in the same form...if that makes sense.
Here is the search form:
Thanks for any direction.
I have a search function for my database. I put in the search criteria and matching criterian open in a new window. I would like to add a sub form to this and have the results open in the same form...if that makes sense.
Here is the search form:
Code:
Private Sub Command12_Click()
If (IsNull(cboType)) Or (IsNull(txtCriteria)) Then
MsgBox "Please select search type", vbOKOnly, "please select search type"
ElseIf [cboType] = "ShortAccountTitle" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmShortAccountTitle"
ElseIf [cboType] = "ContactType" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmContactType"
ElseIf [cboType] = "AccountNumber" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmAccountNumber"
ElseIf [cboType] = "DateEntered" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmDateEntered"
ElseIf [cboType] = "EnteredBy" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmEnteredBy"
ElseIf [cboType] = "InitialContact" And [txtCriteria] > "" Then
DoCmd.OpenForm "frmInitialContact"
End If
End Sub
Thanks for any direction.