Strange selective operation of DataType mismatch error

SoniaP

New member
Local time
Tomorrow, 00:47
Joined
Aug 23, 2014
Messages
2
Hi all,

I have a table 'Project Details' to which I have recently added a new field 'Last Invoice issued'. This field is a text field with a lookup and will default to 'No' for new records being added. When the related record is updated in my 'Invoices' table, I have set up a query to change 'Last Invoice Issued' to yes. This is all working fine, but it requires all the records in 'Project Details' to contain 'No' already in order for it to work. As there are over 1000 records in 'Project Details' I made a list in Excel of the right number of no's and copied it in. Most records were fine with the exception of 127. I can edit any of the other fields from the 'Project Details' datasheet or my data entry form, but when I try to edit one of the 127, I get a DataType mismatch error. I can't understand since the records are all in one table and have exactly the same DataTypes set up for each field, why I can edit some and not others? Is there some other place where DataType can be set up that may affect some records and not others?

I have tried to copy my table to post here but when I do that, I get a 'Index or Primary Key cannot contain a Null value' error due to the (New) record having the default values already in but the primary key not being filled until I save, so I will need to know how to resolve that if I should post.

Have been puzzling over this for a few days, any suggestions would save my sanity!
 
why I can edit some and not others

Open the table and check what each column contains - in one OK record and one that you cannot edit. Note that a blank field can be blank because it holds a "" or a Null, these two differ.
 
Thanks spikepel,
I actually solved this one! I went and had a look at my backup and I saw that some of the fields in my table had the data type number so I changed these fields back to number in the current database and it worked - don't know why as the entries are 'yes' or 'no' but hey, at least its working now!
 

Users who are viewing this thread

Back
Top Bottom