Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAO Error Code: 0xc0d - URGENT

Status
Not open for further replies.

Dboz0000

Instructor
Sep 23, 2004
4
NZ
Hello All,

I've created a Function Procedure in Access that works out a few things see
Procedure below:

Function returncharge(rate_sla, roundforced_sla, timetaken_transactions,
rate_Multiplier, unit_sla)
Dim timetaken
Dim charge
If ((rate_sla > 0) And (roundforced_sla = "No")) Then
charge = Round(((timetaken_transactions * rate_sla) / 60) *
(rate_Multiplier / 100), 2)
Else
If ((rate_sla > 0) And (roundforced_sla = "Yes")) Then
timetaken = Ceiling(timetaken_transactions / unit_sla) * unit_sla
charge = Round(timetaken * rate_sla / 60 * (rate_Multiplier / 100),
2)
Else
charge = 0
End If
End If
returncharge = charge
End Function


That Procedure is in turn used within a query in Access to calculate a few
things - see SQL code for query below:

SELECT Tasks.ProjectID, Users.Country, SLA.Code, Tasks.SLA, Tasks.Name,
Tasks.Logged, Tasks.Closed, Transactions.TimeTaken,
returncharge([SLA]![Rate],[SLA]![RoundForced],[Transactions]![TimeTaken],[Multiplier]![Rate],[SLA]![Unit])
AS Charged, SLA.RoundForced, SLA.Unit, Multiplier.Rate, SLA.Rate
FROM ((SLA INNER JOIN (Tasks INNER JOIN Transactions ON Tasks.ID =
Transactions.TaskID) ON SLA.Name = Tasks.SLA) INNER JOIN Users ON
Tasks.Requestor = Users.Name) INNER JOIN Multiplier ON Transactions.Rate =
Multiplier.Name
WHERE (((Tasks.ProjectID)=0));


Query works BRILLIANT in Access.

I need to use that query in Crystal 9 to compile my report. When I try
connecting to the above Query in the Access database file I'm getting the
following error:
Not supported.
Details: DAO Error Code: 0xc0d
Source: DAO.Paramters
Description: Undefined function 'returncharge' in expression

Now I only created the calculation (Function Procedure and Function in
query) within Access becoz i was heading my head against a brick wall trying
to create that function in Crystal in the first place. So I got it working
in Access - but now can't use it in Crystal. (Head's getting sore now.)

So does anyone know how i can get past this error message (I can not use
anything other than the current Access database - I have no option of using
SQL Server etc etc etc - has to be just Crystal and this Access database)
OR
How can I create that same charge function in Crystal if needs be. (bearing
in mind it also uses "ceiling" - which Crystal 9 doesn't seem to have.)?
????
Help!!!
I'd be very very very grateful - so would my head and the wall.

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top