Re: Access Project 2002 Passing Parameters to a Query

From: Van T. Dinh (VanThien.Dinh_at_discussions.microsoft.com)
Date: 09/21/04


Date: Wed, 22 Sep 2004 00:23:48 +1000

Don't worry about those @ things!

I wrote that your Query / View / SQL String is *not* parametrised as you
constructed the SQL String (by code) using explicit value so the @ thing is
not applicable.

Since you use ADP, the SQL String is handled by the SQL Server engine, not
Access, your SQL String must follow the syntax of T-SQL, espe cially on
delimiting Text and Data *explicit* values. For example, in JET SQL, you
can use either single-quote or double-quote as String delimiter but in
T-SQL, you can only use sigle-quote. Delimiting explit date values in T-SQL
is rather different than JET SQL (#-delimited). You will need to check
B.O.L. for the correct T-SQL data syntax.

-- 
HTH
Van T. Dinh
MVP (Access)
"CLM" <CLM@discussions.microsoft.com> wrote in message
news:361A3DA0-7233-401B-AD81-B7C5696DFE7C@microsoft.com...
> OK so I am on the write track, but last night I attempted to use the
> AFterChange event to assign the txtAcct to the @AcctNum and it didn't like
it
> very much.  Is there a reference I should be setting or is my syntax way
off
> the mark?
>
> Thx,
>
> CLM
>


Relevant Pages

  • Help..About crystal report. <URGENT>
    ... Does anyone know to create crystal reports with sql string (T-SQL) query..?? ... daniel. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Can I Pass Query Parameters Through SQL Statements?
    ... You can construct the SQL String (with parameters replaced ... by explicit values) in code and then use this String as ... HTH ... Van T. Dinh ...
    (microsoft.public.access.modulesdaovba)
  • Re: Passing parameters in a query
    ... Try creating the Select SQL String from scratch with the parameters resolved ... to explicit values in the SQL String so that your SQL String is not ... "Ivan Debono" wrote in message ... > I've got a union query that requires 2 parameters. ...
    (microsoft.public.access.queries)