hi, i am doing an a-level computing project on an order system.
I am having problems searching for a record (by its OrderID) when using the FindRecord function with an inputbox
what i want to do is:
- From a main switchboard, a user clicks on a button that opens up an order form (named 'frmOrder2'), an input box then pops up and asks the user to input the OrderID value (which is numerical). The system then searches through the table 'tblOrder' and shows everything concerning about the order on the order form
i've attempted using this code for the button that opens up the order form and i get this error message 'A macro set to one of the current field's properties failed because of an error in a FindRecord action argument.':
Dim Search As String
Search = InputBox("Please enter the OrderID","OrderSearch")
DoCmd.OpenForm "frmOrder2", acNormal
DoCmd.FindRecord "[OrderID] =" & Search, acEntire, False, acSearchAll, , acCurrent, True
help would be greatly appreciated
I am having problems searching for a record (by its OrderID) when using the FindRecord function with an inputbox
what i want to do is:
- From a main switchboard, a user clicks on a button that opens up an order form (named 'frmOrder2'), an input box then pops up and asks the user to input the OrderID value (which is numerical). The system then searches through the table 'tblOrder' and shows everything concerning about the order on the order form
i've attempted using this code for the button that opens up the order form and i get this error message 'A macro set to one of the current field's properties failed because of an error in a FindRecord action argument.':
Dim Search As String
Search = InputBox("Please enter the OrderID","OrderSearch")
DoCmd.OpenForm "frmOrder2", acNormal
DoCmd.FindRecord "[OrderID] =" & Search, acEntire, False, acSearchAll, , acCurrent, True
help would be greatly appreciated