Results 1 to 6 of 6
  1. #1
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727

    Long Text Box

    Why does this code not work on a "Long Text" or "Memo" box? It works fine in a "Short Text" box.


    If IsNull(Me.txtResolution) Then
    MsgBox "Resolution Field Must Contain Information.", vbInformation, "Requirements"
    MsgBox "Your Record Was Not Saved.", vbInformation, "Notification"
    DoCmd.RunCommand acCmdUndo
    Exit Sub
    End If



    Right now it just skips over this code. Can anyone help with this?


  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,528
    It IS possible that txtResolution = "".
    Check for that too.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    If Me.txtResolution & "" = "" Then
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    I'll try that but does anyone know why I would have to change the code just because the text box is a slightly different format?

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    No idea why your field/textbox acting that way. I just tested a textbox bound to memo type field and the IsNull check works.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    yeah i have no idea either. but i do know that the long text is the cause because when i change the format of the text box to short, the code then works. weird. i still haven't tried the:

    if me.txtresolution = "" then

    once i try it i will let you guys know if that works.

    thanks for the help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Is it possible to make 'long text' longer?
    By rgrstvr in forum Access
    Replies: 1
    Last Post: 07-04-2014, 06:37 PM
  2. Assigning keywords to long text fields.
    By mdv1978 in forum Access
    Replies: 1
    Last Post: 08-02-2012, 08:04 AM
  3. Access XP - trap 'The text is too long to be edited'
    By AccessPoint in forum Programming
    Replies: 2
    Last Post: 09-13-2010, 04:30 PM
  4. Replies: 2
    Last Post: 10-09-2009, 07:34 AM
  5. Text too long, error message
    By taylormotm in forum Access
    Replies: 13
    Last Post: 06-18-2009, 07:24 PM

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