View Full Version : Action query - deleting records


uttwo
11-03-2006, 06:13 AM
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.

FoFa
11-03-2006, 08:24 AM
And Salesdate IS NOT NULL
???
unless it isn't the date field throwing that error

meloncolly
11-03-2006, 08:24 AM
what code are you using? and are you executing a query, or doing it thru vba code?

uttwo
11-03-2006, 10:23 AM
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

meloncolly
11-06-2006, 09:15 AM
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?

AlphaZeroX
11-06-2006, 10:48 AM
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.