469,573 Members | 1,646 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

Recordset Findfirst

The 2 statements below work perfectly when using them individually. But
when I try to concatenate them, they don't.

rst.FindFirst "[docnumber] = " & OldQuoteNumber
rst.FindFirst "[doctype] Is Null"

Can someone please let me know how its done.

Thanks in advance.

My intention is to find a particular docnumber where the doctype is null

rst.FindFirst "[docnumber] = " & OldQuoteNumber AND "[doctype] Is Null"

Paul
Nov 13 '05 #1
5 32124
"Paul" <pz****@rogers.com> wrote:
The 2 statements below work perfectly when using them individually. But
when I try to concatenate them, they don't.

rst.FindFirst "[docnumber] = " & OldQuoteNumber
rst.FindFirst "[doctype] Is Null"

Can someone please let me know how its done.

Thanks in advance.

My intention is to find a particular docnumber where the doctype is null

rst.FindFirst "[docnumber] = " & OldQuoteNumber AND "[doctype] Is Null"

Set up a criteria string and do a FindFirst on that:

Dim strCriteria as String
strCriteria = "[docnumber] = " & OldQuoteNumber & " AND [doctype] Is Null"
rst.FindFirst strCriteria

(note the correction to your syntax)

HTH - Keith.
www.keithwilby.com
Nov 13 '05 #2
Thanks Keith Much appreciated!!! I'll give it a shot.
"Keith Wilby" <ke*********@AwayWithYerCrap.com> wrote in message
news:Xn************************@10.15.188.42...
"Paul" <pz****@rogers.com> wrote:
The 2 statements below work perfectly when using them individually. But
when I try to concatenate them, they don't.

rst.FindFirst "[docnumber] = " & OldQuoteNumber
rst.FindFirst "[doctype] Is Null"

Can someone please let me know how its done.

Thanks in advance.

My intention is to find a particular docnumber where the doctype is null

rst.FindFirst "[docnumber] = " & OldQuoteNumber AND "[doctype] Is Null"

Set up a criteria string and do a FindFirst on that:

Dim strCriteria as String
strCriteria = "[docnumber] = " & OldQuoteNumber & " AND [doctype] Is Null"
rst.FindFirst strCriteria

(note the correction to your syntax)

HTH - Keith.
www.keithwilby.com

Nov 13 '05 #3
Worked like a charm! 8-)
"Keith Wilby" <ke*********@AwayWithYerCrap.com> wrote in message
news:Xn************************@10.15.188.42...
"Paul" <pz****@rogers.com> wrote:
The 2 statements below work perfectly when using them individually. But
when I try to concatenate them, they don't.

rst.FindFirst "[docnumber] = " & OldQuoteNumber
rst.FindFirst "[doctype] Is Null"

Can someone please let me know how its done.

Thanks in advance.

My intention is to find a particular docnumber where the doctype is null

rst.FindFirst "[docnumber] = " & OldQuoteNumber AND "[doctype] Is Null"

Set up a criteria string and do a FindFirst on that:

Dim strCriteria as String
strCriteria = "[docnumber] = " & OldQuoteNumber & " AND [doctype] Is Null"
rst.FindFirst strCriteria

(note the correction to your syntax)

HTH - Keith.
www.keithwilby.com

Nov 13 '05 #4
Paul,

Everything to the right of the equal sign must be a string. Note the
difference in Keith's suggestion and what you had. You did not have an
ampersand after OldQuoteNumber and the word "And" was not included in the
string. If you change your expression to:
rst.FindFirst "[docnumber] = " & OldQuoteNumber & " AND [doctype] Is Null"
it should then work for you.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Paul" <pz****@rogers.com> wrote in message
news:yM********************@rogers.com...
Worked like a charm! 8-)
"Keith Wilby" <ke*********@AwayWithYerCrap.com> wrote in message
news:Xn************************@10.15.188.42...
"Paul" <pz****@rogers.com> wrote:
The 2 statements below work perfectly when using them individually. But when I try to concatenate them, they don't.

rst.FindFirst "[docnumber] = " & OldQuoteNumber
rst.FindFirst "[doctype] Is Null"

Can someone please let me know how its done.

Thanks in advance.

My intention is to find a particular docnumber where the doctype is null
rst.FindFirst "[docnumber] = " & OldQuoteNumber AND "[doctype] Is Null"

Set up a criteria string and do a FindFirst on that:

Dim strCriteria as String
strCriteria = "[docnumber] = " & OldQuoteNumber & " AND [doctype] Is Null" rst.FindFirst strCriteria

(note the correction to your syntax)

HTH - Keith.
www.keithwilby.com


Nov 13 '05 #5
"Paul" <pz****@rogers.com> wrote:
Thanks Keith Much appreciated!


Pleasure :o)

Keith.
www.keithwilby.com
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Bruce | last post: by
1 post views Thread by cnlai | last post: by
5 posts views Thread by Tom van Stiphout | last post: by
7 posts views Thread by pechoi | last post: by
1 post views Thread by paulquinlan100 | last post: by
2 posts views Thread by Tom Clavel | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.