Re: Multi Field SQL Where Clause
- From: SteveS <sanfu@xxxxxxxxxx>
- Date: Thu, 06 Jul 2006 19:38:57 -0800
Hank,
Yes, it should have been a single (double) quote, not three (double) quotes.
And the MsgBox should have been "MsgBox strWhere".
The variables should be Dim'd. Public makes them available to every module.
sysNtCoNo = sysPUOHCoNo
sysNtDvNo = sysPUOHDvNo
sysNtLcCd = sysPUOHLcCd
sysNtApLkNo = sysPUOHNo
In this section of code, what/where are
sysPUOHCoNo
sysPUOHDvNo
sysPUOHLcCd
sysPUOHNo
Are they control names? On a form?
Where is this function? Code behind a form or a standard module? If a form, what is the form name?
How are you calling the function? (a button?)
Why are you using a Function instead of a Sub?
Have you traced (stepped thru) the code? Where is the error?
What exactly doesn't work?
Are the fields
[NtCoNo]
[NtDvNo]
[NtLcCd]
[NtApLkNo]
[NtApLkLn]
in the recordsource for the form "NtMaint"?
Sorry for all the questions, but since I can't see your mdb, I have to be a two year old...... <grin>
Hang in there...
Steve S.
--------------------------------
"Veni, Vidi, Velcro"
(I came, I saw, I stuck around.)
Hank@ieultd wrote:
Hello Again Steve;.
I haven't given up yet of course so here goes.
The triple quotes cause a syntax error. When I remove the two additional quotes the syntax error goes away but the functionality is still absent. Do the definitions have to be DIM rather than PUBLIC as in Public sysNtCoNo as Single
Public sysNtDvNo as Single
Public sysNtLcCd as Single
Public sysNtApLkNo as Long
etc. Note the co/dv & lc are single fixed fields. I don't know if that makes a difference with the quotes within the string or not.
Also note, when using the string as you have defined it the correct values are displayed so it has to be close to correct. Just can't identify the obvious probably.
Thanks Again for all your help!!!
hank
- Follow-Ups:
- Re: Multi Field SQL Where Clause
- From: SteveS
- Re: Multi Field SQL Where Clause
- References:
- Re: Multi Field SQL Where Clause
- From: SteveS
- Re: Multi Field SQL Where Clause
- From: SteveS
- Re: Multi Field SQL Where Clause
- From: Hank@ieultd
- Re: Multi Field SQL Where Clause
- Prev by Date: Re: Hiding a label
- Next by Date: Re: MS Access 2000 run-time error '2465' "can't find the field 'Forms' referred"
- Previous by thread: Re: Multi Field SQL Where Clause
- Next by thread: Re: Multi Field SQL Where Clause
- Index(es):
Relevant Pages
|