I have a table with an sequence (PK) and 2 fields, employee id and
status id. Each employee can have multiple records in this table due
to multiple status ids assigned.
I have a multi-list box on a form which displays all possible statuses.
I want to write code to highlight all the statuses associated with the
employees id.
I currently have tried dlookup but cannot get it to work correctly.
'Populate list box with saved values (if any exist)
For x = 0 To Me!lststatus.Li stCount - 1
If emp_form.ItemDa ta(x) = DLookup("STATUS _ID", "EMP_STATUS ",
"EMP_ID = " & Me![emp id]) Then Me!lststatus.Se lected(x) = True
Next x
Any suggestions on what I am doing wrong? Will Dlookup return more
than one record if they exist?
Thanks!
Joe