Connecting Tech Pros Worldwide Forums | Help | Site Map

problem: table display using combo boxes, option boxes

Paul
Guest
 
Posts: n/a
#1: Nov 12 '05
I have some option boxes and combo boxes that looks up values on a
separate table (i.e. campus table with campusID & campus name fields)

When I choose a selection from the combo box, it puts the information
in a
main table when I do ADD RECORD. Only the campusID (a number) gets
added in
the main table. How can I get the corresponding value displayed on
the table (i.e. campus name) instead of the equivalent campusID (which
is unique).

I want to be able to create a subform & display the actual value the
user sees on the combo box instead of the corresponding number from
the campus table.

Main table Campus Table
========== ============
user campusID
campus name campus name

Main Form
==========
field1: User
field2 (which is a combo box that looks up the campus table): campus
name

Example:

Campus Table:
campusID campus name
========================
1 st. john
2 ucla
3 northwestern

Main Table:
User Campus name
=====================
paul 3
lisa 1
john 1
louie 2

Any ideas would be appreciated. You may email me directly at
pcma10019@yahoo.com. Thank you.

Paul

Salad
Guest
 
Posts: n/a
#2: Nov 12 '05

re: problem: table display using combo boxes, option boxes


Paul wrote:[color=blue]
> I have some option boxes and combo boxes that looks up values on a
> separate table (i.e. campus table with campusID & campus name fields)
>
> When I choose a selection from the combo box, it puts the information
> in a
> main table when I do ADD RECORD. Only the campusID (a number) gets
> added in
> the main table. How can I get the corresponding value displayed on
> the table (i.e. campus name) instead of the equivalent campusID (which
> is unique).
>
> I want to be able to create a subform & display the actual value the
> user sees on the combo box instead of the corresponding number from
> the campus table.
>
> Main table Campus Table
> ========== ============
> user campusID
> campus name campus name
>
> Main Form
> ==========
> field1: User
> field2 (which is a combo box that looks up the campus table): campus
> name
>
> Example:
>
> Campus Table:
> campusID campus name
> ========================
> 1 st. john
> 2 ucla
> 3 northwestern
>
> Main Table:
> User Campus name
> =====================
> paul 3
> lisa 1
> john 1
> louie 2
>
> Any ideas would be appreciated. You may email me directly at
> pcma10019@yahoo.com. Thank you.
>
> Paul[/color]

See Column. Ex: Me.ComboBoxName.Column(1)

Paul
Guest
 
Posts: n/a
#3: Nov 12 '05

re: problem: table display using combo boxes, option boxes


Thanks it worked. How about the option boxes? How can I get it to
display the text value in the table instead of the numerical
equivalent?


Salad <oil@vinegar.com> wrote in message news:<eZAhc.3961$eZ5.1277@newsread1.news.pas.earth link.net>...[color=blue]
>
> See Column. Ex: Me.ComboBoxName.Column(1)[/color]
Salad
Guest
 
Posts: n/a
#4: Nov 12 '05

re: problem: table display using combo boxes, option boxes


Paul wrote:
[color=blue]
> Thanks it worked. How about the option boxes? How can I get it to
> display the text value in the table instead of the numerical
> equivalent?[/color]

The numerical value in an option is associated with the checkbox. The
value displayed is in a label. So you can refer to them by referring to
the Label Name. Ex:
Select case Me.Frame0
case 1
Me.Whatever = Me.FrameLabel1.Caption
Case 2
Me.Whatever = Me.FrameLabel2.Caption
End Select

Now if I had a table with the code and I wanted to know the text value
of it, I might create a lookup table. That's just as easy.

[color=blue]
>
>
> Salad <oil@vinegar.com> wrote in message news:<eZAhc.3961$eZ5.1277@newsread1.news.pas.earth link.net>...
>[color=green]
>>See Column. Ex: Me.ComboBoxName.Column(1)[/color][/color]


Closed Thread