Action query - deleting records

uttwo

Registered User.
Local time
Today, 02:50
Joined
Oct 26, 2006
Messages
10
Hi friends,

I am trying to append records from sales table to sales archive table if salesdate# is <#01/05/2006
It works fine if the sales archive table is blank else it give me an error null conversion failure.

how do i fix this?

thanks.
 
And Salesdate IS NOT NULL
???
unless it isn't the date field throwing that error
 
what code are you using? and are you executing a query, or doing it thru vba code?
 
In the Sales table

i have salesno field, it is an auto number and set to long integer.

Then i have date time field for the datetime and short date

i made an action query as follows

Field saleaa.* Datetimeaa
Table salesaa
Apend to salesarchive.*
Criteria <#01-05-2005#

now it works fine if the salesarchive table is blank else it gives the following error.

Microsoft Acess can't append all the record in the append query.

Microsoft Access set 0 field(s) to Null due to a type conversion failure, and it didn't add 10 record(s) to the table due to key violations, 0 record(s) due to lock violations, and 0 record(s) due to validation rule violations.

Asad
 
sorry, can you post the SQL for your query? The code you've typed is somewhat unclear. What data type is datetimeaa in the salesarchivetable?
 
Try posting the SQL Code for the already created table. This will allow many of the users to explain the problem in a more detailed manner.
 

Users who are viewing this thread

Back
Top Bottom