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 |
#1
|
|||
|
|||
MsgBox cboSelectProduct(0) results in run-time error '13': type mismatch
MsgBox cboSelectProduct(0) results in run-time error '13': type mismatch
dose anyone know why trying to dispay the value from a combo box field would result in a run-time error? |
#2
|
|||
|
|||
MsgBox cboSelectProduct(0) results in run-time error '13': type mi
Try:
msgbox me.cboSelectProduct.value ----- HTH Mr. B http://www.askdoctoraccess.com/ Doctor Access Downloads Page: http://www.askdoctoraccess.com/DownloadPage.htm "ibanton" wrote: MsgBox cboSelectProduct(0) results in run-time error '13': type mismatch dose anyone know why trying to dispay the value from a combo box field would result in a run-time error? |
#3
|
|||
|
|||
MsgBox cboSelectProduct(0) results in run-time error '13': typemi
Perhaps you want one of the following
MsgBox cboSelectProduct.Column(0) or MsgBox cboSelectProduct This assumes that you are running the code from a procedure on a form. If you are not, then you need to reference the combobox more fully MsgBox Forms![NameoftheForm]![cboSelectProduct] Also this assumes you want the currently selected row of the combobox John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County Mr. B wrote: Try: msgbox me.cboSelectProduct.value ----- HTH Mr. B http://www.askdoctoraccess.com/ Doctor Access Downloads Page: http://www.askdoctoraccess.com/DownloadPage.htm "ibanton" wrote: MsgBox cboSelectProduct(0) results in run-time error '13': type mismatch dose anyone know why trying to dispay the value from a combo box field would result in a run-time error? |
#4
|
|||
|
|||
MsgBox cboSelectProduct(0) results in run-time error '13': type mi
Thanks John,
Silly me. I forgot the ".Column" keyword, guess I needed another pair of eyes and a break from looking at code. |
Thread Tools | |
Display Modes | |
|
|