About Automation Object K

edwinastono

Registered User.
Local time
Tomorrow, 05:12
Joined
Oct 31, 2006
Messages
13
Dear friends,

Would you help me to solve this problem ?

I've got an error message while I'm debuging my Access VBA. The error message is like this :

The expression you entered as a query parameter produced this error : 'The object doesn't contain the Automation object 'K."

I've already search the microsoft support's site but couldn't found the answer.

Thank you for your kindness
 
It would help if you would post the code here so we can help you. What that error message is telling you is that somewhere in the code you have referenced something that doesn't exist.
 
Here are the codes, the error appear when I put my mouse in rsqrPPhKh!Bulat while I'm debuging the program

Private Sub PPhSpesial()
Dim PPhSetahun

rsStaff.Open "SELECT * FROM Staff ORDER BY KodeStaff", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
rsqrPPhKh.Open "SELECT * FROM qrPPhKhusus ORDER BY KodeStaff", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
Do While Not rsqrPPhKh.EOF
If rsqrPPhKh!Bulat <= 0 Then
PPhSetahun = 0
ElseIf rsqrPPhKh!Bulat <= 25000000 Then
PPhSetahun = 0.05 * rsqrPPh!BulatKh
ElseIf rsqrPPhKh!Bulat <= 50000000 Then
PPhSetahun = (0.1 * (rsqrPPhKh!Bulat - 25000000)) + 1250000
ElseIf rsqrPPhKh!Bulat <= 100000000 Then
PPhSetahun = (0.15 * (rsqrPPhKh!Bulat - 50000000)) + 3750000
ElseIf rsqrPPhKh!Bulat <= 200000000 Then
PPhSetahun = (0.25 * (rsqrPPhKh!Bulat - 100000000)) + 11250000
Else
PPhSetahun = (0.35 * (rsqrPPhKh!Bulat - 200000000)) + 36250000
End If
rsStaff.Find "KodeStaff = '" & rsqrPPhKh!KodeStaff & "'"
rsStaff!PPh = Round(PPhSetahun / 12, 2)
rsStaff.Update
rsqrPPhKh.MoveNext
Loop
rsqrPPhKh.Close
rsStaff.Close
End Sub
 

Users who are viewing this thread

Back
Top Bottom