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

Access 2000 view Outlook 2000 Inbox error

P: n/a
Hi Everybody

I have an Access 2000 query that "sees" the Outlook 2000 Inbox. This
works fine until an email arrives where the subject field is empty
(Null)

This causes a type mismatch message.

I have tried "Is Not Null" No Joy.

Does anyone know a way to trap this error?

Regards and Thanks Bob

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Bob

hard to say without some more information.

How about you post the SQL of your query (View>SQL view, then copy and
paste).
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

"bobdydd" <re**************@yahoo.co.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi Everybody

I have an Access 2000 query that "sees" the Outlook 2000 Inbox. This
works fine until an email arrives where the subject field is empty
(Null)

This causes a type mismatch message.

I have tried "Is Not Null" No Joy.

Does anyone know a way to trap this error?

Regards and Thanks Bob

Nov 13 '05 #2

P: n/a
Hi Graham
Thanks for taking the time to help me. The SQL of this query is a s
follows:

SELECT CDbl(Format([Received],"yymmddnnss")) AS InboxID, ([Created]) AS
CreatedDate, ([Created]) AS CreatedTime, Inbox.From, Inbox.To,
Inbox.Subject, Inbox.Contents, NumbersOnly([Subject]) AS
NumbersInSubjectField, Right([NumbersInSubjectField],10) AS
ListingEbayNumber, Day([received])+10 AS IDDay, Hour([received])+10 AS
IDTimeHour, Minute([received])+10 AS IDTimeMinute,
Second([received])+10 AS IDTimeSecond
FROM Inbox
WHERE (((NumbersOnly([Subject])) Is Not Null) AND ((Day([received])+10)
Is Not Null) AND ((Hour([received])+10) Is Not Null) AND
((Minute([received])+10) Is Not Null) AND ((Second([received])+10) Is
Not Null))
ORDER BY Inbox.Subject;

Nov 13 '05 #3

P: n/a
Hi Bob

A very interesting looking query!!

I suspect the problem in in the function call:
NumbersOnly([Subject])

I assume that NumbersOnly is a user-defined function somewhere in one of
your project's modules.

My guess is that is it is declared to receive an "As String" argument. For
example:
Public Function NumbersOnly ( MyArgument As String ) As <something>

Because Null is not a string, this will fail. You must either convert the
Null to a string, or change the function so it will accept the Null. The
only VB data type that can be Null is a Variant, so you must change the "As
String" to "As Variant".

I'm sure that if you tell us what NumbersOnly is doing (i.e. post the code)
then someone might be able to suggest a simpler form for your query.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand
"bobdydd" <re**************@yahoo.co.uk> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi Graham
Thanks for taking the time to help me. The SQL of this query is a s
follows:

SELECT CDbl(Format([Received],"yymmddnnss")) AS InboxID, ([Created]) AS
CreatedDate, ([Created]) AS CreatedTime, Inbox.From, Inbox.To,
Inbox.Subject, Inbox.Contents, NumbersOnly([Subject]) AS
NumbersInSubjectField, Right([NumbersInSubjectField],10) AS
ListingEbayNumber, Day([received])+10 AS IDDay, Hour([received])+10 AS
IDTimeHour, Minute([received])+10 AS IDTimeMinute,
Second([received])+10 AS IDTimeSecond
FROM Inbox
WHERE (((NumbersOnly([Subject])) Is Not Null) AND ((Day([received])+10)
Is Not Null) AND ((Hour([received])+10) Is Not Null) AND
((Minute([received])+10) Is Not Null) AND ((Second([received])+10) Is
Not Null))
ORDER BY Inbox.Subject;

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.