T
tgavin
I have a situation where one of my database clients changed their cost per
copy pricing from a set amount based on the series of machine to gradiated
pricing per copy per series. I put a DLookup in the query but it slowed
things down to an unbearable rate...it was already slow due to several
subforms and massive calculations.
I created a curCPC field to hold the cost per copy for the particular
proposal and want to populate it from an after update of the number of
copies, but my code keeps returning an type mismatch error. All my data types
are either currancy or long integer and nothing is null, so I know the types
are right so I figure I have something wrong with the code. I am not sure if
the code is totally right anyway because it needs to find the intCopiesMonth
in between the intBlackMin and the intBlackMax but I wasn't sure how to write
that much and thought I would see what was returned with this...except all
it's returning is an error message of type mismatch.
This is what I wrote:
Dim curCPC As Currency
curCPC = DLookup("[curBlackCopy]", "[tblCopyPrice]", "[intBlackMin] =" &
Me.[intCopiesMonth] And "[intSeriesID] = " & Me.Series)
Any help would be greatly appreciated.
Thanks
Terri
copy pricing from a set amount based on the series of machine to gradiated
pricing per copy per series. I put a DLookup in the query but it slowed
things down to an unbearable rate...it was already slow due to several
subforms and massive calculations.
I created a curCPC field to hold the cost per copy for the particular
proposal and want to populate it from an after update of the number of
copies, but my code keeps returning an type mismatch error. All my data types
are either currancy or long integer and nothing is null, so I know the types
are right so I figure I have something wrong with the code. I am not sure if
the code is totally right anyway because it needs to find the intCopiesMonth
in between the intBlackMin and the intBlackMax but I wasn't sure how to write
that much and thought I would see what was returned with this...except all
it's returning is an error message of type mismatch.
This is what I wrote:
Dim curCPC As Currency
curCPC = DLookup("[curBlackCopy]", "[tblCopyPrice]", "[intBlackMin] =" &
Me.[intCopiesMonth] And "[intSeriesID] = " & Me.Series)
Any help would be greatly appreciated.
Thanks
Terri