2 column pulldown

G

Guest

hi - having a 'senior moment'.....

have Table1 which has a field/columnX that is a lookup of another table2.
Table2 is two column and column one is the bound value.

have Form1 completely & uniformly based on Table1; therefore textboxes for
fieldX from Table1 is pulldown revealing candidate values of Table2. The
pulldown box reveals the two columns and column one is the bound value (per
the properties of the Form's textbox which align exactly to the properties of
the lookup properties of Table1 fieldX)

but when you select a value from the pulldown list on Form1 (Table2 info)&
the pulldown closes - all that one sees remaining in the text box is just the
column1 info. Although column1 is the needed bound info I would like to
still see both columns for general read-ability of the form since the bound
info of column1 is only a cryptic code.

How do I keep column 2 visible in Form1 textboxX when the pulldown value is
selected and its list window shrinks back to the selected value only?

v2003. thnx...
 
A

Allen Browne

Couple of options:

1. Place a text box beside Combo1, and set its Control Source to:
=[Combo1].Column(1)
The text box then displays the 2nd column of the combo.

2. Change the RowSource of the combo to:
SELECT F1, F1 & " " & F2 As MyDisplayColumn FROM Table1;
Set these properties:
Column Count 2
Column Widths 0
The combo now displays both fields (the 2nd column), but still stores the
first one.
 
G

Guest

much thanx...have a little problem with 2nd method;

entered litteral duplicate of your suggestion but plugged in actual Table1
name within [ ]

but not sure about F1 and F2.....

left them literally as F1 and F2 - - and it did not work.....

these field heading names come from Table2 since it is a lookup and so
replaced F1 & F2 with these column names of Table 2.... and it does not
work....

in both attempts I get a parameter prompt when changing over from design
view to form view of the form...

Table1 of course only has a single column name

So not clear as to what F1 & F2 are.... sorry to be thick
--
NTC


Allen Browne said:
Couple of options:

1. Place a text box beside Combo1, and set its Control Source to:
=[Combo1].Column(1)
The text box then displays the 2nd column of the combo.

2. Change the RowSource of the combo to:
SELECT F1, F1 & " " & F2 As MyDisplayColumn FROM Table1;
Set these properties:
Column Count 2
Column Widths 0
The combo now displays both fields (the 2nd column), but still stores the
first one.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

NetworkTrade said:
hi - having a 'senior moment'.....

have Table1 which has a field/columnX that is a lookup of another table2.
Table2 is two column and column one is the bound value.

have Form1 completely & uniformly based on Table1; therefore textboxes for
fieldX from Table1 is pulldown revealing candidate values of Table2. The
pulldown box reveals the two columns and column one is the bound value
(per
the properties of the Form's textbox which align exactly to the properties
of
the lookup properties of Table1 fieldX)

but when you select a value from the pulldown list on Form1 (Table2 info)&
the pulldown closes - all that one sees remaining in the text box is just
the
column1 info. Although column1 is the needed bound info I would like to
still see both columns for general read-ability of the form since the
bound
info of column1 is only a cryptic code.

How do I keep column 2 visible in Form1 textboxX when the pulldown value
is
selected and its list window shrinks back to the selected value only?

v2003. thnx...
 
A

Allen Browne

Sorry: F1 and F2 represent your field names (whatever field1 and field2 are
called).

Presumably the RowSource of the combo calls for 2 fields.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

NetworkTrade said:
much thanx...have a little problem with 2nd method;

entered litteral duplicate of your suggestion but plugged in actual Table1
name within [ ]

but not sure about F1 and F2.....

left them literally as F1 and F2 - - and it did not work.....

these field heading names come from Table2 since it is a lookup and so
replaced F1 & F2 with these column names of Table 2.... and it does not
work....

in both attempts I get a parameter prompt when changing over from design
view to form view of the form...

Table1 of course only has a single column name

So not clear as to what F1 & F2 are.... sorry to be thick
--
NTC


Allen Browne said:
Couple of options:

1. Place a text box beside Combo1, and set its Control Source to:
=[Combo1].Column(1)
The text box then displays the 2nd column of the combo.

2. Change the RowSource of the combo to:
SELECT F1, F1 & " " & F2 As MyDisplayColumn FROM Table1;
Set these properties:
Column Count 2
Column Widths 0
The combo now displays both fields (the 2nd column), but still stores the
first one.

NetworkTrade said:
hi - having a 'senior moment'.....

have Table1 which has a field/columnX that is a lookup of another
table2.
Table2 is two column and column one is the bound value.

have Form1 completely & uniformly based on Table1; therefore textboxes
for
fieldX from Table1 is pulldown revealing candidate values of Table2.
The
pulldown box reveals the two columns and column one is the bound value
(per
the properties of the Form's textbox which align exactly to the
properties
of
the lookup properties of Table1 fieldX)

but when you select a value from the pulldown list on Form1 (Table2
info)&
the pulldown closes - all that one sees remaining in the text box is
just
the
column1 info. Although column1 is the needed bound info I would like
to
still see both columns for general read-ability of the form since the
bound
info of column1 is only a cryptic code.

How do I keep column 2 visible in Form1 textboxX when the pulldown
value
is
selected and its list window shrinks back to the selected value only?

v2003. thnx...
 
G

Guest

hi & thanks again:

your model: SELECT F1, F1 & " " & F2 As MyDisplayColumn FROM Table1;

was returning a parameter prompt for the F1 & F2 field values...

so I experimented and modified your model to Table 2 i.e.

SELECT F1, F1 & " " & F2 As MyDisplayColumn FROM Table2;

and initial review is that it is working......
--
NTC


Allen Browne said:
Sorry: F1 and F2 represent your field names (whatever field1 and field2 are
called).

Presumably the RowSource of the combo calls for 2 fields.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

NetworkTrade said:
much thanx...have a little problem with 2nd method;

entered litteral duplicate of your suggestion but plugged in actual Table1
name within [ ]

but not sure about F1 and F2.....

left them literally as F1 and F2 - - and it did not work.....

these field heading names come from Table2 since it is a lookup and so
replaced F1 & F2 with these column names of Table 2.... and it does not
work....

in both attempts I get a parameter prompt when changing over from design
view to form view of the form...

Table1 of course only has a single column name

So not clear as to what F1 & F2 are.... sorry to be thick
--
NTC


Allen Browne said:
Couple of options:

1. Place a text box beside Combo1, and set its Control Source to:
=[Combo1].Column(1)
The text box then displays the 2nd column of the combo.

2. Change the RowSource of the combo to:
SELECT F1, F1 & " " & F2 As MyDisplayColumn FROM Table1;
Set these properties:
Column Count 2
Column Widths 0
The combo now displays both fields (the 2nd column), but still stores the
first one.

hi - having a 'senior moment'.....

have Table1 which has a field/columnX that is a lookup of another
table2.
Table2 is two column and column one is the bound value.

have Form1 completely & uniformly based on Table1; therefore textboxes
for
fieldX from Table1 is pulldown revealing candidate values of Table2.
The
pulldown box reveals the two columns and column one is the bound value
(per
the properties of the Form's textbox which align exactly to the
properties
of
the lookup properties of Table1 fieldX)

but when you select a value from the pulldown list on Form1 (Table2
info)&
the pulldown closes - all that one sees remaining in the text box is
just
the
column1 info. Although column1 is the needed bound info I would like
to
still see both columns for general read-ability of the form since the
bound
info of column1 is only a cryptic code.

How do I keep column 2 visible in Form1 textboxX when the pulldown
value
is
selected and its list window shrinks back to the selected value only?

v2003. thnx...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top