Matching a Public Variable to a Row in a Combo Box (1 Viewer)

Robert Dunstan

Mr Data
Local time
Today, 01:57
Joined
Jun 22, 2000
Messages
291
Hi all,

I have a public variable (pubJobNoID) that contains a JobNoID value for a job which is of variant data type. I also have a combo box that list all the available jobs which is bound to the JobNoID field

Please can someone remind me what the code is for looping through the combo box and returning the row that matches pubJobNoID.

Many thanks
 

RichMorrison

Registered User.
Local time
Yesterday, 19:57
Joined
Apr 24, 2002
Messages
588
You have to create a *function* that returns a value.

I don't know what you mean by "looping through the combo box"

If you want to present a list or combo box with all stuff that meets some criteria, then make a *query* and use it as the RecordSouce of the combo box. Use the *function* as a Criteria in the query.

See Access Help for "Property" procedures.

HTH,
RichM
 

Robert Dunstan

Mr Data
Local time
Today, 01:57
Joined
Jun 22, 2000
Messages
291
Hi RichM

Thanks for your reply. Sorry for sounding a bit vague but yeah your right, I did use a function to return the value etc.

I suddenly remembered how to do it late last night :cool:

Yesterday was just one of those days :rolleyes:

Anyway I've got it to do what I wanted so thanks for taking the time to reply :)

Rob
 

Users who are viewing this thread

Top Bottom