I do have a form called booking, when user should be able to type a booking number in text box and by clicking on the Find button then all the details for this booking should be displayed.
My problem is when I type the number and click on Find I will get this error message
[Run time error ‘3021’;
Either BOF or EOF is True, or the current record has been deleted; the
operation requested by the application requires a current record.]
By clicking on Debug it will highlight this line [dtacustomer.Recordset.MoveNext] in the profind function.
Any Idea why I do get this error.
Below is the code which I am using.
Private Sub cmdfind_Click() dtabooking.Recordset.MoveFirst While txtbooking <> txtfind And dtabooking.Recordset.EOF = False dtabooking.Recordset.MoveNext Wend profind End Sub
This is in the profind function code
Public Sub profind() dtacustomer.Recordset.MoveFirst While txtcustomer <> txtcustomerNo dtacustomer.Recordset.MoveNext Wend dtaRoom.Recordset.MoveFirst While txtroom <> txtroomNo dtaRoom.Recordset.MoveNext Wend Call MakeVisible End Sub