Go to a Record on a SubForm With a Listbox

ddrew

seasoned user
Local time
Today, 19:00
Joined
Jan 26, 2003
Messages
911
I have a Listbox that I want to use to go to a record on a subform. I know that it cant be done with the wizard.

The records that I am looking at don't have an ID so I want to look at both a date field [TrainingDate] and a Time Field [TrainingTime]. I have set the querry up and the list gets populated with the correct information. And I have added the following code to the AfterUpdate Event

Code:
    DoCmd.SearchForRecord , "", acFirst, "[TrainingDate] = " & Str(Nz(Screen.ActiveControl, 0))

The reason that it has no RecordID is that the records could be inported and that would produce duplicates.
 
Solved it, added an ID but didn't export it, then on the import it just auto adds so can use the ID t find the correct record.
 

Users who are viewing this thread

Back
Top Bottom