Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1187

Re: Trying to pass a date as a parameter to my Acces query in VBA code

From "Theo Tress" <rbk@online.de>
Newsgroups comp.lang.basic.visual.misc
Subject Re: Trying to pass a date as a parameter to my Acces query in VBA code
Date 2012-06-07 11:31 +0200
Organization 1&1 Internet AG
Message-ID <jqq2vj$5on$1@online.de> (permalink)
References <abdfea84-a302-4be7-ba6a-616e65626642@f30g2000vbz.googlegroups.com>

Show all headers | View raw


Without entering your code deeper,  think..

>"SELECT * INTO tbl" & p_sQueryName & " FROM ...

it's never a good idea to insert variables directly, because there might be 
blanks or other unallowed characters in the variable, so simply use somewhat 
like

"SELECT * INTO " & fnConvert(p_sQueryName)....

where fnConvert adds chr$(34) around the variable's content.

You might just try this before digging deeper.



Regards,
TT 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Trying to pass a date as a parameter to my Acces query in VBA code colmkav <colmjkav@yahoo.co.uk> - 2012-06-06 08:36 -0700
  Re: Trying to pass a date as a parameter to my Acces query in VBA code "Theo Tress" <rbk@online.de> - 2012-06-07 11:31 +0200
    Re: Trying to pass a date as a parameter to my Acces query in VBA code colmkav <colmjkav@yahoo.co.uk> - 2012-06-07 06:01 -0700
      Re: Trying to pass a date as a parameter to my Acces query in VBA code "Theo Tress" <rbk@online.de> - 2012-06-09 17:15 +0200

csiph-web