Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Your site is a great idea. I should have joined your site years ago. Better late than never..."

Geography

Where in the world do Tek-Tips members come from?
robojeff (TechnicalUser)
20 Jul 12 14:59


I have two Combo box questions:

1. Is there a way to center the text in each column of a Combo box?

Setting the text align to center for the properties of the Combo box don't seem to work in my access 2007 as seen in the picture below where all text fields in the combo box are left justified...

2. In the form view, my Combo box looks blank until I click on the pull down and than all of the contents are shown. then if I select a record, it becomes highlighted. And then after it is selected only one number appears on the combo box (see picture below)

How do I get the title to always appear and the title and the selected record to appear once a record has been selected?






Thanks!
Helpful Member!  dhookom (Programmer)
21 Jul 12 0:07
I don't believe you can center the content of the columns in a combo box. You can set all of the columns widths to 0 until the first column that you want to display when the combo is not dropped down.

Duane
Hook'D on Access
MS Access MVP

Helpful Member!  missinglinq (Programmer)
21 Jul 12 12:48
The Wizard known as Stephen Lebans has a hack for that:

Right and Center Justify Comboboxes

The Missinglinq

Richmond, Virginia

The Devil's in the Details!

robojeff (TechnicalUser)
23 Jul 12 9:04

I changed the combo box back over to a list box so that I can see what is selected after the selection is made...

I do notice that after I execute my code to update the table information that is shown in the list box that the info displayed in the list box does not update until I select another item in the list box.

Is there a way to update this without having to select some other item in the list box?
dhookom (Programmer)
23 Jul 12 9:13
I don't understand your question. Is the control bound?

I'm not sure why you changed the combo to a list box? Do you need to see more than one item displayed?

Duane
Hook'D on Access
MS Access MVP

robojeff (TechnicalUser)
23 Jul 12 9:21


Yes the control is bound to a table item but does not appear on the form as updated if it is selected in the list box until after it is not selected even though the table value has changed...

If I set a break point in my code right after the table is updated, the data in the list box will update with the change (with the item selected) when the break point occurs.... Without the break point, the list box data remains the same until it is unselected.
dhookom (Programmer)
23 Jul 12 9:38
Change the control back to a combo box.

Duane
Hook'D on Access
MS Access MVP

robojeff (TechnicalUser)
23 Jul 12 9:56

I would change it back to a Combo box then I am back the problem that I originally reported.

With the combo box, I see a blank looking box on a form until I select the down arrow and then I can see the whole list but after something is selected, only the first column of the item selected is displayed and no title as shown below:



The List box displays the data as I would like to see it but I don't know how to make
the combo box display this information:




(http://s1148.photobucket.com/albums/o572/irethedo/...)
dhookom (Programmer)
23 Jul 12 11:18
Did you understand my comment

Quote (dhookom)

You can set all of the columns widths to 0 until the first column that you want to display when the combo is not dropped down
.

Duane
Hook'D on Access
MS Access MVP

dhookom (Programmer)
23 Jul 12 11:19
I clicked the Post button too quickly. If you don't understand the suggestion, please reply with the Row Source SQL view of the combo box as well as which columns you want displayed.

Duane
Hook'D on Access
MS Access MVP

robojeff (TechnicalUser)
23 Jul 12 11:26


Sorry, I don't understand the suggestion...

Here is the Row Source information that I use for the list box or the combo box:

CODE -->

SELECT D.ID AS Device, D.DevCode, D.Asm, D.Desc, D.SBU, D.IDate, D.IsBy, D.FMAC, D.LMAC, D.ID
FROM M_tbl AS D
ORDER BY D.ID; 


thank you
dhookom (Programmer)
23 Jul 12 11:33

Quote (dhookom)

as well as which columns you want displayed
When the combo is closed, you can only view one column. This column can be an expression like:

CODE --> sql

D.DevCode & " - " & D.Asm & " - " & D.Desc & " - " & D.SBU & " - " & D.IDate 
You can also add more text boxes with control sources like:

CODE --> ControlSource

=cboDeviceID.Column(1) 
You should set the Enabled property to No and the Locked property to Yes.

Duane
Hook'D on Access
MS Access MVP

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close