Hi all,
I'm sure this will be a dead easy fix for this forum.. but its had me :banghead: for hours..
I have a database to control lending of power tools, i based it around a lending library and have built a form where i want to add a search box so that a power tool can be scanned on its unique barcode to find the relevant record and the check out/in procedure can then be completed.
Im getting an invalid argument error 3001
I've built the code around the search button as follows. ive highlighted what is showing as error in red.
Private Sub Find_Click()
If IsNull(Search) = False Then
Me.Recordset.FindFirst '[Item]=' & Search
Me!Search = Null
If Me.Recordset.NoMatch Then
MsgBox "No Record Found", vbOKOnly + vbInformation, "Sorry"
Me!Search = Null
End If
End If
End Sub
I have created a text box and named it search, ive also bound it to Item in the dropdown menu (but this makes the box show an item number based on the record selected at the bottom- i seem unable to make it a blank search return system) and have built the code as above. i have created a command button called Find
I have Item as a column in table Assets so don't know if i need to fit this in somewhere?
Is anyone able to help me out? if needed i can email the workbook database.
Many thanks in advance...
Dan
I'm sure this will be a dead easy fix for this forum.. but its had me :banghead: for hours..
I have a database to control lending of power tools, i based it around a lending library and have built a form where i want to add a search box so that a power tool can be scanned on its unique barcode to find the relevant record and the check out/in procedure can then be completed.
Im getting an invalid argument error 3001
I've built the code around the search button as follows. ive highlighted what is showing as error in red.
Private Sub Find_Click()
If IsNull(Search) = False Then
Me.Recordset.FindFirst '[Item]=' & Search
Me!Search = Null
If Me.Recordset.NoMatch Then
MsgBox "No Record Found", vbOKOnly + vbInformation, "Sorry"
Me!Search = Null
End If
End If
End Sub
I have created a text box and named it search, ive also bound it to Item in the dropdown menu (but this makes the box show an item number based on the record selected at the bottom- i seem unable to make it a blank search return system) and have built the code as above. i have created a command button called Find
I have Item as a column in table Assets so don't know if i need to fit this in somewhere?
Is anyone able to help me out? if needed i can email the workbook database.
Many thanks in advance...
Dan