|
 |
access thread: DLookup Gives problem....
Message #1 by "Maqsood Ahmed" <maqsood2000@h...> on Thu, 13 Mar 2003 21:19:40
|
|
I am using DLookup function in access to match one criteria. but getting
the following message.
Runtime error '3075'
Syntax error (comma) in query expression '[Xfernumber]= 890,5325000,,"
The code I am using is: XferNumber is the column name and
CVC_Main_Database is the Table name , I am comparing XferNumber against
the strXferNumber which has the value 890,5325000.
varX = DLookup("[XferNumber]", "CVC_Main_Database", "[XferNumber] = " &
strXferNumber)
And the table column XferNumber CVC_Main_Database is
XferNumber
890,5325000,,
Message #2 by "Wesley Kendrick" <wes@f...> on Thu, 13 Mar 2003 21:29:19 -0000
|
|
Hi
I think it may be the commas at the end of the string that are causing the
problem.
Do you need them? try removing them and see if it cures the problem
Hope this helps, regards, Wesley Kendrick
----- Original Message -----
From: "Maqsood Ahmed" <maqsood2000@h...>
To: "Access" <access@p...>
Sent: Thursday, March 13, 2003 9:19 PM
Subject: [access] DLookup Gives problem....
> I am using DLookup function in access to match one criteria. but getting
> the following message.
>
> Runtime error '3075'
> Syntax error (comma) in query expression '[Xfernumber]= 890,5325000,,"
>
> The code I am using is: XferNumber is the column name and
> CVC_Main_Database is the Table name , I am comparing XferNumber against
> the strXferNumber which has the value 890,5325000.
>
> varX = DLookup("[XferNumber]", "CVC_Main_Database", "[XferNumber] = " &
> strXferNumber)
>
> And the table column XferNumber CVC_Main_Database is
>
> XferNumber
>
> 890,5325000,,
>
>
Message #3 by Lonnie Johnson <prodevmg@y...> on Fri, 14 Mar 2003 05:51:31 -0800 (PST)
|
|
Looks like your strXferNumber is a string and your need inner (single) quotes. Try this:
varX = DLookup("[XferNumber]", "CVC_Main_Database", "XferNumber = '"
& strXferNumber & "'")
Hope that helps.
Wesley Kendrick <wes@f...> wrote:Hi
I think it may be the commas at the end of the string that are causing the
problem.
Do you need them? try removing them and see if it cures the problem
Hope this helps, regards, Wesley Kendrick
----- Original Message -----
From: "Maqsood Ahmed"
To: "Access"
Sent: Thursday, March 13, 2003 9:19 PM
Subject: [access] DLookup Gives problem....
> I am using DLookup function in access to match one criteria. but getting
> the following message.
>
> Runtime error '3075'
> Syntax error (comma) in query expression '[Xfernumber]= 890,5325000,,"
>
> The code I am using is: XferNumber is the column name and
> CVC_Main_Database is the Table name , I am comparing XferNumber against
> the strXferNumber which has the value 890,5325000.
>
> varX = DLookup("[XferNumber]", "CVC_Main_Database", "[XferNumber] = " &
> strXferNumber)
>
> And the table column XferNumber CVC_Main_Database is
>
> XferNumber
>
> 890,5325000,,
>
>
Lonnie Johnson
ProDev, Professional Development of MS Access Databases
http://www.prodev.us
Let me build your next MS Access database application.
---------------------------------
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
Message #4 by "Maqsood Ahmed" <maqsood2000@h...> on Fri, 14 Mar 2003 15:05:37
|
|
Actually I need these commas as well. Any solution ?
Thanks,
> Hi
I think it may be the commas at the end of the string that are causing the
problem.
Do you need them? try removing them and see if it cures the problem
Hope this helps, regards, Wesley Kendrick
----- Original Message -----
From: "Maqsood Ahmed" <maqsood2000@h...>
To: "Access" <access@p...>
Sent: Thursday, March 13, 2003 9:19 PM
Subject: [access] DLookup Gives problem....
> I am using DLookup function in access to match one criteria. but getting
> the following message.
>
> Runtime error '3075'
> Syntax error (comma) in query expression '[Xfernumber]= 890,5325000,,"
>
> The code I am using is: XferNumber is the column name and
> CVC_Main_Database is the Table name , I am comparing XferNumber against
> the strXferNumber which has the value 890,5325000.
>
> varX = DLookup("[XferNumber]", "CVC_Main_Database", "[XferNumber] = " &
> strXferNumber)
>
> And the table column XferNumber CVC_Main_Database is
>
> XferNumber
>
> 890,5325000,,
>
>
Message #5 by "Hamilton. Tom" <hamiltont@s...> on Fri, 14 Mar 2003 07:39:11 -0800
|
|
Then what you have is a string value. Enclose it in single quotes as
varX =3D DLookup("[XferNumber]", "CVC_Main_Database", "[XferNumber] =3D
'" & strXferNumber &"'")
-----Original Message-----
From: Maqsood Ahmed [mailto:maqsood2000@h...]
Sent: Friday, March 14, 2003 7:06 AM
To: Access
Subject: [access] Re: DLookup Gives problem....
Actually I need these commas as well. Any solution ?
Thanks,
> Hi
I think it may be the commas at the end of the string that are causing
the
problem.
Do you need them? try removing them and see if it cures the problem
Hope this helps, regards, Wesley Kendrick
----- Original Message -----
From: "Maqsood Ahmed" <maqsood2000@h...>
To: "Access" <access@p...>
Sent: Thursday, March 13, 2003 9:19 PM
Subject: [access] DLookup Gives problem....
> I am using DLookup function in access to match one criteria. but
getting
> the following message.
>
> Runtime error '3075'
> Syntax error (comma) in query expression '[Xfernumber]=3D
890,5325000,,"
>
> The code I am using is: XferNumber is the column name and
> CVC_Main_Database is the Table name , I am comparing XferNumber
against
> the strXferNumber which has the value 890,5325000.
>
> varX =3D DLookup("[XferNumber]", "CVC_Main_Database", "[XferNumber]
=3D " &
> strXferNumber)
>
> And the table column XferNumber CVC_Main_Database is
>
> XferNumber
>
> 890,5325000,,
>
>
|
|
 |