By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,569 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,569 IT Pros & Developers. It's quick & easy.

Recordset Findfirst

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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.