Validation Rule error

AnnPhil

Registered User.
Local time
Today, 22:43
Joined
Dec 18, 2001
Messages
246
I have an Excel spreadsheet that i want to put in Access and then break the data into tables. I had no problem importing the spreadsheet into one table, but when i try to put the data in different tables by appending records and fields i get a validation rules! the fields in both tables are text!!!! Out of 1000 records 400 do not get appended because of this. Is there something about the data from an Excel file that causes this? I have never run into this before. Sample fields are FirstName LastName, both tables are text with all other properties set the same. I am at a loss
 
Thanks Pat, that worked, now for my next update query maybe you can be of help. I have two tables, one field i want to update. both are Number data type with Integer field size. when i try to run the update query, it gives me an error stating that it can not update because - due to a type conversion failure!!!

Thanks for your help
 
If the field that is the destination for your query is a numeric type and the source is not, use a function of the source. Like

CInt([text-field-1]) or CLng or CCur or CDbl or whatever numeric type is correct. In other words, explicity compute the correct numeric type within the query.

To be excruciatingly careful, you might wish to use

CInt( Nz( [text-field-1], 0 ) )

if your goal is to store integer 0 when you see a blank text field.

Or, of course, CLng... as appropriate.
 

Users who are viewing this thread

Back
Top Bottom