Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlight record in listbox where bound column = criteria

Status
Not open for further replies.

corner40

Technical User
Nov 20, 2002
126
CA
hi guys
I have a listbox "lstKidSelect" on form "forms![f_bookinghead]![f_bookingheadform]" that I need to do some things with.
Most importantly I need to highlight a certain record when the form is opened.
I have a listbox "ctlLstBxResult" on form "editbookingsearch" that is used to select the criteria for opening forms![f_bookinghead]![f_bookingheadform]. When the form is opened, I need to select the record relating to the criteria passed.
example in pseudo coding:

forms![f_bookinghead]![f_bookingheadform].lstkidselect(value in bound column) = forms![editbookingsearch].ctlLstBxResult.column(0)

so I don't know if I need to get what the column number is and set the itemdata to it or what?

any help would be greatly appreciated
thanks
Jeremy
 
Have you tried simply this ?
Forms!f_bookinghead!f_bookingheadform.Form!lstKidSelect = Forms!editbookingsearch!ctlLstBxResult.Column(0)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi PHV Hi Ginger
no this is a different post...
PHV yes I did get it working with making them equal each other...Just hadn't updated this yet to say I got it to work...
thanks though guys, I had just been trying to make it too complicated.
thanks
Jeremy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top