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

I

ibanton

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?
 
J

John Spencer

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
 
I

ibanton

Thanks John,

Silly me. I forgot the ".Column" keyword, guess I needed another pair of eyes
and a break from looking at code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top