Hi guys,
I have 2 forms say form1 and form2. Now in form1 the user enters a code in a textbox say EnterCodeTxt, now if that record is already present in a table say table1 then a command box is activated and the user can press it to view the existing record. The command box opens form2 and some texboxes on form2 use Dlookup to dislay the existing record
i.e. Me.ATextboxName = DLookup("Field", "Table1", "Code='" & Forms![Form1]![EnterCodeTxt] & "'")
Now the problem
If the code entered by the user is in more then 1 record, i need a way to allow the user to move through the records. I have made command buttons for navigational purposes, i.e. GoToNext, GoToPrevious, but have not been able to get them to work. Because i am using dlookup to open the records.
I need code for command buttons GoToNext, GoToPrevious to do as the name states, to records being displayed on textboxes on form2. I need a way to loop through the records and display them using dlookup, possibly?
Hope that makes sense, thanks in advance for any help,
M-.
I have 2 forms say form1 and form2. Now in form1 the user enters a code in a textbox say EnterCodeTxt, now if that record is already present in a table say table1 then a command box is activated and the user can press it to view the existing record. The command box opens form2 and some texboxes on form2 use Dlookup to dislay the existing record
i.e. Me.ATextboxName = DLookup("Field", "Table1", "Code='" & Forms![Form1]![EnterCodeTxt] & "'")
Now the problem
If the code entered by the user is in more then 1 record, i need a way to allow the user to move through the records. I have made command buttons for navigational purposes, i.e. GoToNext, GoToPrevious, but have not been able to get them to work. Because i am using dlookup to open the records.
I need code for command buttons GoToNext, GoToPrevious to do as the name states, to records being displayed on textboxes on form2. I need a way to loop through the records and display them using dlookup, possibly?
Hope that makes sense, thanks in advance for any help,
M-.