Welcome to SPN

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

Sign Up Now!

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;
    >
     

Share This Page