B
bleighfield
Hi everyone
Hope someone can help with this one..
Background:
I work in vehicle fleet, I have built something to 'predict' when a
car/van
service is due (it's fairly simple, calculates miles per day between 2
known
dates/mileages and then uses the car's service schedule to work out what
date the next service would be due, by selecting the 'closer' of 2
calculated dates, one is based on miles, one based on time).
It also calculates when the vehicle's annual UK MOT (vehicle
roadworthiness) test is due and if it's within a month of the service,
ties the
2 events together.
After calculations are complete a new table is output and that is used
for
subsequent reporting. The new table is overwritten each time the
calculations query is run.
Problem:
Anyway I built it for a single client's data and it worked. I have now
tried to
add another client by appending their data and when the
calculation/output
query runs I get the following error
'Data Type Mismatch In Criteria expression'
I thought it was because I maybe had a text field in the import that
should
be a number, something like that, but copying the structure of the main
table to a temporary one and importing data to that didn't show up any
errors.
Also, the error does not always happen at the same point in the query. I
have managed to output the file with as little as 300 records appended
before the error, or as many as 600 (and points in between). If I work
in
small(ish) batches to append, I seem to get further.
I thought I had a (vague) memory that date calculations can cause this
error (and I have quite a few of those), but I'm no Access expert and am
stuck for an answer.
Any help gratefully received.
Thanks in advance.
Bob
Hope someone can help with this one..
Background:
I work in vehicle fleet, I have built something to 'predict' when a
car/van
service is due (it's fairly simple, calculates miles per day between 2
known
dates/mileages and then uses the car's service schedule to work out what
date the next service would be due, by selecting the 'closer' of 2
calculated dates, one is based on miles, one based on time).
It also calculates when the vehicle's annual UK MOT (vehicle
roadworthiness) test is due and if it's within a month of the service,
ties the
2 events together.
After calculations are complete a new table is output and that is used
for
subsequent reporting. The new table is overwritten each time the
calculations query is run.
Problem:
Anyway I built it for a single client's data and it worked. I have now
tried to
add another client by appending their data and when the
calculation/output
query runs I get the following error
'Data Type Mismatch In Criteria expression'
I thought it was because I maybe had a text field in the import that
should
be a number, something like that, but copying the structure of the main
table to a temporary one and importing data to that didn't show up any
errors.
Also, the error does not always happen at the same point in the query. I
have managed to output the file with as little as 300 records appended
before the error, or as many as 600 (and points in between). If I work
in
small(ish) batches to append, I seem to get further.
I thought I had a (vague) memory that date calculations can cause this
error (and I have quite a few of those), but I'm no Access expert and am
stuck for an answer.
Any help gratefully received.
Thanks in advance.
Bob