Cant Find Object

IkeK

New member
Local time
Today, 09:57
Joined
Jan 11, 2024
Messages
4
Hello All.

I created a view in SQL that can be viewed in Access ADP.

I want to email this view.

I have a simple docmd line that should work, but the error I get is below. The strange thing is that Access is adding a one to Query name. I tried assigning it to a variable and I get the same thing. Below is the screen shot of the error and code I am typing in the immediate window to test.

docmd.SendObject acSendQuery ,"CurtisDrayageInvoiceEmail", acFormatXLSX,"test@email.com"

1705002332673.png
 
Compare the line of text you typed to the error message. Your code is different from what you posted.
I dont see what you are reffering to. The queryName is hard Coded as "CurtisDrayageInvoiceEmail" the error is coming back "CurtisDrayageInvoiceEmail1" . it appears the system is adding a 1 to the query name.
 
Have you tried another query just as a debug step?
That syntax works fine for me?
 

Users who are viewing this thread

Back
Top Bottom