By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,855 Members | 1,996 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,855 IT Pros & Developers. It's quick & easy.

Combo Box design question

P: n/a

So moving on in my project, I've replaced all of my "Lookup" fields with
regular field types. Now I'm designing my combo boxes. I've used the
combobox wizard to create a few, and have set the control source to the
field I want stored.

In one instance, I have 3 columns - ID, Event, EventDate. I've hidden the
first column (ID) in the combo box by setting the width to 0".

Is there a way to get both of the other columns to display in the combo
box, always? Or am I restricted to one column when the box is "closed"?
What is the standard practice for something like this?

Thanks,

Kevin
Jan 16 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Concatenation is the solution

Jan 16 '06 #2

P: n/a
I took a combo box in my Access sample database on the frmInvDialog
form. The combo box is called InvNum with ColumnCount property of 5
and ColumnWidths property of 0.8";0.8";0.8";0.8";0.8". Thus the combo
box shows 5 columns with the InvNum field being the first column.

Now if I change the ColumnWidths property to have the first column to
be 0 in width like this things still work fine and I can see the other
4 columns just fine:
0";0.8";0.8";0.8";0.8"

Best regards,
-Paul
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/Access - Access Database Sample

Jan 16 '06 #3

P: n/a
On Mon, 16 Jan 2006 20:36:41 GMT, Kevin wrote:
So moving on in my project, I've replaced all of my "Lookup" fields with
regular field types. Now I'm designing my combo boxes. I've used the
combobox wizard to create a few, and have set the control source to the
field I want stored.

In one instance, I have 3 columns - ID, Event, EventDate. I've hidden the
first column (ID) in the combo box by setting the width to 0".

Is there a way to get both of the other columns to display in the combo
box, always? Or am I restricted to one column when the box is "closed"?
What is the standard practice for something like this?

Thanks,

Kevin


No, not using the fields by themselves.
A Combo box on drop-down will show all columns with a width greater
than 0.
However, when the combo is NOT in drop-down, only the first column
that is wider than 0 will be displayed.

The only thing you can do is concatenate the fields into one new
column. Show this column instead of any of the others.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jan 16 '06 #4

P: n/a
On Mon, 16 Jan 2006 12:40:36 -0800, nbeaubien wrote:
Concatenation is the solution


Yep, it sure is. Thanks.
Jan 17 '06 #5

P: n/a
Create a query that concatenates the event name and date into a single
field. It will then show even when the combo is not dropped down.

1. In form design view, right-click the combo, and choose Properties.

2. Click the Build button (...) beside the RowSource property (Data tab.)

3. Access opens the query builder. You need something like this in SQL View
(View menu):
SELECT ID, Trim(Event & " " & EventDate) AS TheEvent
FROM tblEvent
ORDER BY EventDate, ID;

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kevin" <wi******@hotmail.com> wrote in message
news:pa****************************@hotmail.com...

So moving on in my project, I've replaced all of my "Lookup" fields with
regular field types. Now I'm designing my combo boxes. I've used the
combobox wizard to create a few, and have set the control source to the
field I want stored.

In one instance, I have 3 columns - ID, Event, EventDate. I've hidden the
first column (ID) in the combo box by setting the width to 0".

Is there a way to get both of the other columns to display in the combo
box, always? Or am I restricted to one column when the box is "closed"?
What is the standard practice for something like this?

Thanks,

Kevin

Jan 17 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.