Hello All,
I had this working and for some reason I broke it somewhere...
Basically I created a button to search for records based on the status of a checkbox and data in a textbox. The code searches for the first item found and prompts if the search needs to continue in order to find additional records.
This is the code:
If I enter a bogus record, it works fine by saying "No records found", the first record is always found, the problem lies when the user clicks yes, no additional records are pulling up...
Your help is greatly appreciated...
Alex
I had this working and for some reason I broke it somewhere...
Basically I created a button to search for records based on the status of a checkbox and data in a textbox. The code searches for the first item found and prompts if the search needs to continue in order to find additional records.
This is the code:
Code:
If IsNull(txtAssetTagSearch) = True Then
MsgBox "Please Enter Tag or Partial Tag to Search.", vbOKOnly + vbInformation, "AMS - Asset Tag Search"
Exit Sub
End If
If Me.chkActiveRecs = True Then
Me.Recordset.FindFirst "AssetTag Like '*" & txtAssetTagSearch & "*' And [Active] = True"
If Me.Recordset.NoMatch Then
MsgBox "No Record Found", vbOKOnly + vbInformation, "AMS - Asset Tag Search"
Me!txtAssetTagSearch = Null
Else
Do While Not Me.Recordset.NoMatch
If MsgBox("Continue Searching?", vbYesNo + vbQuestion, "AMS - Asset Tag Search") = vbNo Then
Me!txtAssetTagSearch = Null
Exit Sub
End If
Me.Recordset.FindNext "AsstTag Like '*" & txtAssetTagSearch & "*' And [Active] = True"
Me!txtAssetTagSearch = Null
Loop
End If
Your help is greatly appreciated...
Alex
Comment