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. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|