stLinkCriteria help

H

hotplate

How do I add the following criteria:


stLinkCriteria = "IsNull([tbl8D].[Close_Date])"

to this criteria:

stLinkCriteria = "Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] &
"#"

Every time I try to combine the two I get a "Type Mismatch" or can not
find the expression "|" depending on how I try to write it.
 
J

Jeff Boyce

You are attempting to describe "how" ... but haven't explained "what". What
will having the combination ("add the following...") allow you to do?

And what do you expect to end up with after "adding the following..."? Are
you aware that the result of IsNull() is boolean T/F? Why are you trying to
add T/F to a date?

And I don't think you get to SET the value of DateValue() ... that function
returns the DateValue of something.

Tell us more about the underlying data ... what are [Close_Date] and
[Initiate_Date] and [NCMTDate]?

More info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
D

Dirk Goldgar

hotplate said:
How do I add the following criteria:


stLinkCriteria = "IsNull([tbl8D].[Close_Date])"

to this criteria:

stLinkCriteria = "Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] &
"#"

Every time I try to combine the two I get a "Type Mismatch" or can not
find the expression "|" depending on how I try to write it.


Maybe this:

stLinkCriteria = _
"Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] & "#" & _
" AND " & _
"[tbl8D].[Close_Date] Is Null"

Although you may not need the "[tbl8D]." qualifier, leaving you with this:

stLinkCriteria = _
"Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] & "#" & _
" AND " & _
"[Close_Date] Is Null"
 
H

hotplate

Thank you, this worked!!


How do I add the following criteria:
stLinkCriteria = "IsNull([tbl8D].[Close_Date])"
to this criteria:
stLinkCriteria = "Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] &
"#"
Every time I try to combine the two I get a "Type Mismatch" or can not
find the expression "|" depending on how I try to write it.

Maybe this:

    stLinkCriteria = _
        "Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] & "#" & _
        " AND " & _
        "[tbl8D].[Close_Date] Is Null"

Although you may not need the "[tbl8D]." qualifier, leaving you with this:

    stLinkCriteria = _
        "Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] & "#" & _
        " AND " & _
        "[Close_Date] Is Null"

--
Dirk Goldgar, MS Access MVP
Access tips:www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
J

Jeff Boyce

Thanks, Dirk!

All I could see was the toothpicks ... way too close to even see trees!

Jeff B.

Dirk Goldgar said:
hotplate said:
How do I add the following criteria:


stLinkCriteria = "IsNull([tbl8D].[Close_Date])"

to this criteria:

stLinkCriteria = "Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] &
"#"

Every time I try to combine the two I get a "Type Mismatch" or can not
find the expression "|" depending on how I try to write it.


Maybe this:

stLinkCriteria = _
"Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] & "#" & _
" AND " & _
"[tbl8D].[Close_Date] Is Null"

Although you may not need the "[tbl8D]." qualifier, leaving you with this:

stLinkCriteria = _
"Datevalue([Initiate_Date])=" & "#" & Me![NCMTDate] & "#" & _
" AND " & _
"[Close_Date] Is Null"


--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top