Ed_Farias
Mar 28th, 2000, 12:37 AM
I am using the below code to search for a particular user or asset tag# in a database. The code works fine, the problem is after I search for the user, my back and forward buttons no longer scroll through database. Any help is appreciated.
If optUser.Value = True Then
Dim UserName As String
UserName = InputBox("Which User would you like to search for?")
datComputers.RecordSource = "select * from Computers " & _
"where UserID = '" & UserName & "'"
datComputers.Refresh
Else
Dim AssetTag2 As String
AssetTag2 = InputBox("Which AssetTag would you like to search for?")
datComputers.RecordSource = "select * from Computers " & _
"where AssetTag = '" & AssetTag2 & "'"
datComputers.Refresh
End If
If optUser.Value = True Then
Dim UserName As String
UserName = InputBox("Which User would you like to search for?")
datComputers.RecordSource = "select * from Computers " & _
"where UserID = '" & UserName & "'"
datComputers.Refresh
Else
Dim AssetTag2 As String
AssetTag2 = InputBox("Which AssetTag would you like to search for?")
datComputers.RecordSource = "select * from Computers " & _
"where AssetTag = '" & AssetTag2 & "'"
datComputers.Refresh
End If