AddNew method won't accept blanks

Results 1 to 3 of 3

Thread: AddNew method won't accept blanks

  1. #1
    Milana Guest

    Default AddNew method won't accept blanks

    I am trying to add a new record to my MS Access table. Using either AddNew or INSERT INTO won&#039t let me add a record if I leave one of the non-required fields blank. The error message says <BR>"Field &#039Orders.fax&#039 can&#039t be a zero-length string. " How can I add a record with some fields left blank? I checked the MS Access table design - none of the fields are required there.<BR><BR>Thank you!!!<BR>

  2. #2 Guest

    Default RE: AddNew method won't accept blanks

    Make sure that the FAX field:<BR><BR>1. Isn&#039t a required field<BR>2. Doesn&#039t have an index that does not allow duplicates

  3. #3
    Join Date
    Dec 1969

    Default RE: AddNew method won't accept blanks

    This can also be caused by your settings in Access.<BR><BR>Open your offending table in design view, look at the properties on one of the coumns that&#039s causing you problems. Check the property called "Alow Zero-Length". If it is set to "No" then you will be unable to INSERT a value of "" into it.<BR><BR>You can correct this behavior in one of two ways, and the method you use to correct it is important, if you wish your current database to be robust and long-lived.<BR><BR>The correct way to handle it would be to check, when an INSERT is to be run, which columns actually have values associated with them, then buidl and execute an INSERT statement that modifies only those columns.<BR><BR>The quick fix would be to set "Allow Zero Length" to Yes.<BR><BR>Really just depends on how serious you are about the database.<BR><BR>Kurt

Posting Permissions

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