Compile error - Syntax error

W

Walter

I'm trying to set up a multiselect listbox for a query parameter. I found a
reference to http://www.mvps.org/access/forms/frm0007.htm for code to
accomplish this. However when I copied and pasted this code into my code
window the last line - strSQL=left$(strSQL,len(strSQL)-12)) was highlighted
in red. Debug shows it to be a syntax error. How do I correct this?
 
J

John W. Vinson

I'm trying to set up a multiselect listbox for a query parameter. I found a
reference to http://www.mvps.org/access/forms/frm0007.htm for code to
accomplish this. However when I copied and pasted this code into my code
window the last line - strSQL=left$(strSQL,len(strSQL)-12)) was highlighted
in red. Debug shows it to be a syntax error. How do I correct this?

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.
 

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