HI I am having a real mental block with this problem so can any one help.
I am creating a driver database to keep track of approved drivers. I record any driving offence in a table called convictions. This is to track such items as speeding drink driving etc. What I want to do is look in the convictions table and see how many penalty points any one driver has.
I was going to use the following
dim pen as double
pen = dsum("Penpoints","Convictions","[name] = "& "'" & Me![named] & "'" And (date - [dateofofence] < 1860))
but this comes up with a type miss match error.
The date expression is to take the current date and deduct the date the person was fined on and if it is less than a given number of daya adds all the points together.
can any one see what I am doing wrong?
Thanks
Paul
I am creating a driver database to keep track of approved drivers. I record any driving offence in a table called convictions. This is to track such items as speeding drink driving etc. What I want to do is look in the convictions table and see how many penalty points any one driver has.
I was going to use the following
dim pen as double
pen = dsum("Penpoints","Convictions","[name] = "& "'" & Me![named] & "'" And (date - [dateofofence] < 1860))
but this comes up with a type miss match error.
The date expression is to take the current date and deduct the date the person was fined on and if it is less than a given number of daya adds all the points together.
can any one see what I am doing wrong?
Thanks
Paul