Jump to content

how to create a blank in a field that won't accept nulls in access


Recommended Posts

Posted
i'm trying to edit a db that has records with three fields. one of the fields is blank on all records. when i try to enter a blank in that field on a new record it tells me i can't use nulls. i've tried to copy and paste the blank field from a record that's already there and get the same error message. would anyone know what could be in that field that is showing up as blank?
Posted

A database has the concept of a 'NULL' value - that is, nothing has been entered into that field. This is different from a blank value (in which an empty string has been passed to the database).

 

I'm presuming you have access to the Design View of the table? In which case the column has 'Required' set, meaning you're not allowed to leave the NULL value in there and you have to enter something.

 

Required-MSAccess.png

Posted

Even with Referential Integrity enforced, I'm still able to change Required from 'Yes' to 'No on a column.

It's been a while since I used Access so I may be missing something.

 

Are you getting any kind of errors when you try?

Also, what's the database for?

Posted
It contains tort codes for classifications. usually once a year i have to update the tables for some classes that are missing tort codes. i dont really know what they are. this is an hr database. the tables it is linked to is another type of database.
Posted
I'm afraid it sounds like you're talking about Linked Tables where you are accessing a different Access database; That's something I've not touched in Access for many years I'm afraid. Someone else might be more familiar with it, sorry!
Posted

The other possibility is that this is a primary key, in which case it won't let you turn off required.

 

That being said, it should never have blank/null values already so maybe not.

Posted
The other possibility is that this is a primary key, in which case it won't let you turn off required.

 

That being said, it should never have blank/null values already so maybe not.

 

This is why I was confused - there are already blank values in this column, so surely someone has switched 'Required' on after those records were entered, or there's some other constraint I'm unaware of that's causing this.

 

@Siobhanhan - Please could you provide a screenshot of the Design View of this table, with all confidential information redacted? Ideally with the field in question selected so we can see the panel at the bottom like on my earlier screenshot.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...