Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    post an example of Status so we know what we're dealing with.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  2. #17
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Status is not a reserved word.
    No, Nz does not convert null, it returns an alternate value of your choice via the "value if null" parameter. If you don't specify the "value if null" parameter I believe you get a variant that contains an empty string. Not sure.
    I can't think of any conversion functions (e.g. CDate) that will accept empty strings or nulls except maybe CStr. Nor will functions such as Left, AFAIK.
    So validate what is being passed to any function on a line that raises an error. If they're nested, test the function expressions from the inside out.
    Last edited by Micron; 10-18-2022 at 03:26 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #18
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296
    Quote Originally Posted by davegri View Post
    Certainly. Why try to process data that you know is bad?
    I didn't see where this was said but I ended up doing this if the value is a ZLS it jumps to the end of sub.
    I am not sure if there is a better way to do this but I did it like so:
    Code:
    If (strStatus = "") Then GoTo LastLine
    
    
    LastLine:
    End Sub
    Maybe I can just replace the GoTo with End Sub. I will attempt it. Either way this issue is solved!

  4. #19
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Just use

    Code:
    If strstatus  = "" Then Exit Sub
    Much simpler!
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. ODBC Connection is Changing My Data Type
    By Enrightt in forum Access
    Replies: 3
    Last Post: 02-08-2018, 06:03 PM
  2. Changing the join type
    By SunTop in forum Queries
    Replies: 3
    Last Post: 09-28-2016, 12:00 PM
  3. Changing data type with linked file
    By suprdave in forum Import/Export Data
    Replies: 2
    Last Post: 01-20-2016, 10:37 AM
  4. changing multiple fields type to double
    By neefbeef in forum Access
    Replies: 1
    Last Post: 12-07-2014, 03:20 AM
  5. Changing Data Type of Imported Field Name
    By rhubarb in forum Import/Export Data
    Replies: 12
    Last Post: 06-16-2014, 08:20 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums