SendObject Command

S

Steven

Is there a way to send a single record in either form view or datasheet view? I don't want to send every record in the table I just want to send an individual record that is viewed at the time the macro is run. Any help would be great. Thanks
 
C

Cheryl Fischer

Steven,

As you have seen from looking at the SendObject action or method, there is
no Where Clause available to allow you to send a single record from the many
which may be in the record source of your form. I would suggest creating
and saving a query containing the fields you want to send and including in
this query a Criteria: row which points directly to your form and the key
field value of the current record. For example, if the field on your form
which uniquely identifies the record to be emailed is CustomerID, make sure
that field is in your query; and, in the Criteria: row enter the name of
your form and the control containing that value: Forms!MyForm!CustomerID.
Then, instead of sending your form via SendObject, send the Query.

hth,

--

Cheryl Fischer, MVP Microsoft Access



Steven said:
Is there a way to send a single record in either form view or datasheet
view? I don't want to send every record in the table I just want to send an
individual record that is viewed at the time the macro is run. Any help
would be great. Thanks
 
S

Steven

"Can you hear me now? Good.

Cheryle

I have but two words for you! THANK YOU! That was just what I needed. I don't know why I wasn't able to figure it out on my own. I've have in our database now and it's working wonders! My company and I thank you. We are now able to better serve our customers more quickly.

"We never stop working for you.
-Steven
 
C

Cheryl Fischer

Glad to hear the solution works for you. Good luck with your project!

--

Cheryl Fischer, MVP Microsoft Access



Steven said:
"Can you hear me now? Good."

Cheryle,

I have but two words for you! THANK YOU! That was just what I needed. I
don't know why I wasn't able to figure it out on my own. I've have in our
database now and it's working wonders! My company and I thank you. We are
now able to better serve our customers more quickly.
 

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