Compile error - Syntax error

  • Thread starter Thread starter Walter
  • Start date Start date
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?
 
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.
 
Back
Top