A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

More Q: on combo boxes



 
 
Thread Tools Display Modes
  #11  
Old September 12th, 2007, 07:35 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default More Q: on combo boxes

Change the value of the property!

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Ana" wrote in message
...
Douglas,
Is there a way around?
TIA
Ana

"Douglas J. Steele" escribió en el
mensaje de noticias ...
I'm guessing that the ColumnCount property of the combo box doesn't
reflect the true count.

The Column collection only goes as high as the ColumnCount property says
to.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Ana" wrote in message
...
Is the Status_ID in the 3rd column of the combo box? That's what your
code
assumes.

Yes. I've Status_Name as a second column (1)


Dim strCriteria As String

strCriteria = "[CLIENT_ID] = " & Me!Combo25.Column(0) & _
" AND [STATUS_ID] = " Me!Combo25.Column(2)
MsgBox strCriteria
DoCmd.OpenReport stDocName, acViewPreview, , strCriteria

Does the message box contain what you expect?

Yes. It displays: [CLIENT_ID] = AND [STATUS_ID] =
However, if I change ...Column(2) to ....Column(1), the box displays the
same msg as above.
In few words, the combo box doesn't see (or pass) anything but
column(0).






  #12  
Old September 12th, 2007, 07:42 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default More Q: on combo boxes

It just occurred to me that your question may mean something other than it
appears.

Are you saying that you only want the one column to show in the combo box,
but that you want to be able to refer to the other (hidden) columns? In that
case, you set the ColumnCount property to the correct value, and you set the
ColumnWidths property appropriately. If you've got 4 columns, and you only
want the first column to be visible, you'd use something like 1";0";0";0"
(or whatever width you want for the visible column)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Douglas J. Steele" wrote in message
...
Change the value of the property!

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Ana" wrote in message
...
Douglas,
Is there a way around?
TIA
Ana

"Douglas J. Steele" escribió en el
mensaje de noticias ...
I'm guessing that the ColumnCount property of the combo box doesn't
reflect the true count.

The Column collection only goes as high as the ColumnCount property says
to.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Ana" wrote in message
...
Is the Status_ID in the 3rd column of the combo box? That's what your
code
assumes.

Yes. I've Status_Name as a second column (1)


Dim strCriteria As String

strCriteria = "[CLIENT_ID] = " & Me!Combo25.Column(0) & _
" AND [STATUS_ID] = " Me!Combo25.Column(2)
MsgBox strCriteria
DoCmd.OpenReport stDocName, acViewPreview, , strCriteria

Does the message box contain what you expect?

Yes. It displays: [CLIENT_ID] = AND [STATUS_ID] =
However, if I change ...Column(2) to ....Column(1), the box displays
the same msg as above.
In few words, the combo box doesn't see (or pass) anything but
column(0).








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.