+ Reply to Thread
Results 1 to 2 of 2

ADO.Addnew command with empty fields results in 0 value in database

  1. #1
    Registered User
    Join Date
    07-29-2019
    Location
    NC, USA
    MS-Off Ver
    365 64bit
    Posts
    47

    ADO.Addnew command with empty fields results in 0 value in database

    I'm creating the array (values_array) for the values from with variables in an object that either have a value or don't (empty) but when using ADO.Addnew the fields that were empty are entered as 0 (database field is long integer type) even though my Access database has these set for no default value. Is there a solution to this? I was hoping to avoid having to check each of these variables before having them added to the arrays.

    Thanks
    Last edited by pharmacologist; 08-07-2021 at 03:58 PM.

  2. #2
    Registered User
    Join Date
    07-29-2019
    Location
    NC, USA
    MS-Off Ver
    365 64bit
    Posts
    47

    Re: ADO.Addnew command with empty fields results in 0 value in database

    Well looping through the array and removing the values was actually easy so nevermind

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 11-21-2014, 10:00 PM
  2. Listbox addNew Items?
    By mreFF in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2014, 03:42 PM
  3. how to edit fields using vba command
    By hasanbirol in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2013, 11:21 AM
  4. Issues with AddNew method arguments
    By nemo66ro in forum Access Tables & Databases
    Replies: 11
    Last Post: 11-18-2012, 04:10 PM
  5. Search Through Database And Display Results In Userform without showing database
    By nirvanarapeme in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2012, 05:18 PM
  6. .Addnew with .Update still overwrites record - how do I change this?
    By Luonas in forum Access Programming / VBA / Macros
    Replies: 7
    Last Post: 03-09-2012, 09:03 AM
  7. Merging Vertical fields up if fields to either side are empty
    By SuperMykEl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2008, 11:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1