Connecting Tech Pros Worldwide Help | Site Map

problem: table display using combo boxes, option boxes

  #1  
Old November 12th, 2005, 10:57 PM
Paul
Guest
 
Posts: n/a
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
  #2  
Old November 12th, 2005, 10:57 PM
Salad
Guest
 
Posts: n/a

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)

  #3  
Old November 12th, 2005, 10:59 PM
Paul
Guest
 
Posts: n/a

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]
  #4  
Old November 12th, 2005, 11:00 PM
Salad
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
display data in datagrid using adodc through code in depending on query DIPPU answers 1 September 25th, 2007 12:57 PM
Cascading lists problem visionstate@googlemail.com answers 6 July 5th, 2006 11:45 AM
Main Form & Continuous Subform (with Requery) Problem Dave Boyd answers 4 November 13th, 2005 04:39 AM
problem: table display using combo boxes, option boxes Paul answers 3 November 12th, 2005 10:33 PM