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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

MsgBox cboSelectProduct(0) results in run-time error '13': type mismatch



 
 
Thread Tools Display Modes
  #1  
Old September 10th, 2009, 08:42 PM posted to microsoft.public.access.gettingstarted
ibanton
external usenet poster
 
Posts: 2
Default 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  
Old September 10th, 2009, 08:52 PM posted to microsoft.public.access.gettingstarted
Mr. B[_4_]
external usenet poster
 
Posts: 171
Default 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  
Old September 10th, 2009, 09:54 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default 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  
Old September 10th, 2009, 11:19 PM posted to microsoft.public.access.gettingstarted
ibanton
external usenet poster
 
Posts: 2
Default 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

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 07:01 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.