Page 5 of 5 FirstFirst 12345
Results 61 to 65 of 65
  1. #61
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816

    Yes, those are breakpoints. Now run code.
    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.

  2. #62
    gaker10 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    262
    It's saying that the value of txtAlternateB is "", so I guess technically it's not null?

  3. #63
    gaker10 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    262
    So, intuitively I tried:

    Code:
    If Not (Me.txtAlternateA = "") Then
        CurrentDb.Execute "INSERT INTO EntryFormTable(Component, Description, UOM) " & _
        " VALUES ('" & Me.txtAlternateA & "','" & Me.txtAltADescription & " \ALT" & "','" & Me.txtAltAUOM & "')"
        End If
        
        If Not (Me.txtAlternateB = "") Then
        CurrentDb.Execute "INSERT INTO EntryFormTable(Component, Description, UOM) " & _
        " VALUES ('" & Me.txtAlternateB & "','" & Me.txtAltBDescription & " \ALT" & "','" & Me.txtAltBUOM & "')"
        End If
    And it worked hehe I have a couple more things I'd like to ask about that are unrelated to the title of this post, but are still based on the functionality of this same project. Should I make a new thread?

  4. #64
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    New thread sounds like good idea. Can reference link to this thread if think relevant.

    I never allow empty strings in fields.

    The following handles both Null and empty string.

    If Not Me.txtAlternateB & "" = "" 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.

  5. #65
    gaker10 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    262
    Excellent. I will use that.

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. 1 Combobox with values from 2 tables
    By Comsoft in forum Access
    Replies: 1
    Last Post: 04-23-2013, 05:42 PM
  2. Replies: 9
    Last Post: 01-17-2013, 09:08 PM
  3. Forms - ComboBox - Sort/Edit Tables
    By farner in forum Forms
    Replies: 3
    Last Post: 01-05-2013, 09:05 PM
  4. Replies: 1
    Last Post: 06-25-2012, 02:15 PM
  5. Replies: 0
    Last Post: 08-24-2010, 06:38 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