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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get secondary field from combo box?

Status
Not open for further replies.

ulteriormotif

Technical User
May 18, 2003
79
NZ
One of my forms has a combo box for 'bin type', which has three fields in the combo box:

bin id
bin desc
bin weight

'bin id' is the bound field, which is correct.

However, I'd also like to be able to make use of the 'bin weight' field on the form.

Specifically the form is recording the number of bins of product sent to a vendor - there are a range of bins with varying weights. For the user's ease, I'd like to be able to show the standard measurement equivalent of the bins submitted on the form.

eg:

[2] [Type1] bins submitted (@ 400 kg ea = 800 kg) = 8 std units
[4] [Type3] bins submitted (@ 50 kg ea = 200 kg) = 2 std units

ugh. sorry. I'm not very good at expressing these things in writing.

Upshot is that what I need is to be able to access the bin weight in my combo box for each record, even though it is not the bound field.

I'm sure I've seen somewhere how this can be done, but I've exhausted my search abilities so far.

Any help appreciated.
 
How are ya ulteriormotif . . . . .

Easiest would be to [blue]bound a duplicate combo[/blue] and set the [blue]BoundColumn[/blue] to [purple]3[/purple].

Calvin.gif
See Ya! . . . . . .
 
Eureka! Found it.

Turns out it's dead easy. In the text box you want to capture the hidden field in:

=[comboboxname].Column(2)

- where (2) is the number of the visible column you want to capture. ie, if the bound column [bin id] is set to zero width (which it is), then [bin weight] is column 2.
 
:) Hiya TheAceMan1

hmmm.. could do. Would the user have to manually select from both columns? I can't have them increasing their data entry, plus the risk of errors is huge any time I give them any leeway.

Or are you envisaging the second combo auto-populating from the first somehow?
 
ulteriormotif said:
[blue]I need is to be able to access the bin weight in my combo box [blue]for each record[/blue], [purple]even though it is not the bound field.[/purple] [/blue]
I thought this indicated the textbox was bound. But you've shown it isn't.

Besides having one value that will repeat, the value won't be saved and [purple]what if an selection is yet to be made in the combo?[/purple]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top