Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Access 2000 view Outlook 2000 Inbox error

Discussion in 'Information Technology' started by bobdydd, Nov 1, 2005.

  1. bobdydd

    bobdydd
    Expand Collapse
    Guest

    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
     
  2. Loading...


  3. Graham Mandeno

    Graham Mandeno
    Expand Collapse
    Guest

    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" <reallyuseful2004@yahoo.co.uk> wrote in message
    news:1130789945.338662.259130@g14g2000cwa.googlegroups.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
    >
     
  4. bobdydd

    bobdydd
    Expand Collapse
    Guest

    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;
     
  5. Graham Mandeno

    Graham Mandeno
    Expand Collapse
    Guest

    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" <reallyuseful2004@yahoo.co.uk> wrote in message
    news:1130828846.712757.130180@o13g2000cwo.googlegroups.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;
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page