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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type MisMatch Error

Status
Not open for further replies.

ebizleads

Technical User
Sep 14, 2005
57
US
I'm running this function from a macro and get a Type mismatch error...any idea why?

Function EPack()
On Error GoTo EPack_Err

DoCmd.OpenForm "EmailPackage", acNormal, "SCEmail", "", , acHidden
DoCmd.OutputTo acOutputReport, "EmailPackage", acFormatRTF, "C:\MyDebtIQ\Packages\" & [Last Name] & "_" & [First Name] & ".rtf"
DoCmd.OpenQuery "SendContract-Email-U", acViewNormal, acEdit


EPack_Exit:
Exit Function

EPack_Err:
MsgBox Error$
Resume EPack_Exit

End Function
 
ok...figured this out-FYI. Had to reference the form in the following:

DoCmd.OutputTo acOutputReport, "EmailPackage", acFormatRTF, "C:\MyDebtIQ\Packages\" & [Last Name] & "_" & [First Name] & ".rtf"


To:

DoCmd.OutputTo acOutputReport, "EPackage", acFormatRTF, "C:\MyDebtIQ\Packages\" & Forms![Main Lead Console].[ClientID] & "_" & Forms![Main Lead Console].[qlast] & "_" & Forms![Main Lead Console].[qfirst] & ".rtf"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top