Link to home
Start Free TrialLog in
Avatar of tc100years
tc100years

asked on

Access 2003 Form: Sync Record with listbox selected item

I need a form that shows 'all the record' in a list box and the selected value (if one) in the list box to be the active record in the form object boxes (see attached photo).  

What form record events can I invoke to set the record to be the selected record in the list box?  I'm drawing a blank here...
form-example.bmp
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

you can use the afterupdate event of the listbox, to find the corresponding record or to filter the form

'to filter the form
private sub Listboxname_afterupdate()

me.filter="[Software]='" & me.listboxName & "'"
me.filteron=true

end sub
'find the corresponding record

private sub Listboxname_afterupdate()

with me.recordsetclone
     .findfirst "[Software]='" & me.listboxName & "'"
     if not .nomatch then me.bookmark=.bookmark
end with

end sub


if you are using recordID for both the form and the listbox, we will use them to find the record

post the rowsource of yuor listbox, boundcolumn



ASKER CERTIFIED SOLUTION
Avatar of Helen Feddema
Helen Feddema
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tc100years
tc100years

ASKER

AWESOME!  IT WORKED!

Thanks much!