Invalid use of property.

F

Franck

I have a sub showing a message box and calling another sub and after
continue few code. when the sub is called it doesn't even run trough
it i received a Invalid use of property and it point out my other sub

this is the boggus sub and dont find anything wrong in it

Public Sub PrintJob()
On Error GoTo Err_PrintJob

NetPrint

Select Case CurrentSerie
Case "CRD"
CRDPrint
Case "DA2"
DA2Print
Case "DA3"
DA3Print
Case "DA4"
DA4Print
Case "PDS"
DPPrint
Case "DP"
DPPrint
Case "DA5"
DA5Print
Case "DA6"
DA6Print
Case "DB"
DBPrint
Case "DK"
DKPrint
Case "DS"
DSPrint
Case "DSV"
DSVPrint
Case "DQ"
DQPrint
Case "MAM"
MAMPrint
Case "PAC"
PACPrint
Case "RA5"
DA5Print
Case "DV5"
DA5Print
Case "RB"
RBPrint
Case "RK"
RKPrint
Case "RS"
RSPrint
End Select

NetPrint
DoCmd.OpenReport "QuotationReportDetails", acViewPreview

Exit_PrintJob:
Exit Sub
Err_PrintJob:
MsgBox ("Error " & Err & ": " & Error$)
Resume Exit_PrintJob
End Sub
 
F

Franck

i think i found my problem.
PrintJob seems to be already existing in namespaces as an event. i
change it for PrintJob1 and it worked

i knew the code logic was good.
 
K

Ken Snell \(MVP\)

On which line of your code do you get the "invalid use of property" error?
 
F

Franck

the error was on the call of the sub i show there. but if it would
have been the case of a normal error it wouldnt have been Invalid
property because its a sub PrintJob it would have been invalid
function or unknown sub well anything except invalid property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top