parameters in SendObject

G

Guest

I want to use the SendObject macro to send an email to people that lets them
know when an object has been updated in access. If possible, I want it to
read something like: "Up to date as of [date parameter]", and when it's run
Access prompts for the date. Is this possible to do inside the message text?
Thanks!
 
S

Steve Schapel

BK,

It sounds like you want the date shown to be the current date... would
that be right?
 
G

Guest

Not quite, sometimes the update might not be done until between 11:00am and
noon, so we don't want people who view it in the morning before it's updated
thinking that it is up to date as of that day. I just wondered if it was
possible to put some kind of parameter into the message that prompts the
sender to enter the parameter (the date) when SendObject is run
Thanks!

Steve Schapel said:
BK,

It sounds like you want the date shown to be the current date... would
that be right?

--
Steve Schapel, Microsoft Access MVP
I want to use the SendObject macro to send an email to people that lets them
know when an object has been updated in access. If possible, I want it to
read something like: "Up to date as of [date parameter]", and when it's run
Access prompts for the date. Is this possible to do inside the message text?
Thanks!
 
S

Steve Schapel

BK,

Yes it is possible. But I am going to discourage you from this
approach. Having users enter data via parameter prompts gives a too
high (in my opinion) probability of error. Here's what I would do...

Make a simple little unbound form, with an unbound textbox, and a
command button. Set the Format property of the textbox to a valid date
format. Maybe you could set the Default Value of the textbox to Date().
Then, on the event that would trigger the need to send an email, use
an OpenForm macro to open this date entry form. And on the Click event
of the command button, another macro, where you have your SendObject
action, plus a Close action to close the date criteria form. Make
sense? Then, the Message Text argument of the send object is like this:
="Up to date as of " & [NameOfYourTextbox]
.... or, possibly, you will need:
="Up to date as of " & Format([NameOfYourTextbox],"dd\-mm\-yy")
(or whatever your desired format is).
 
G

Guest

Works perfect, thanks!

Steve Schapel said:
BK,

Yes it is possible. But I am going to discourage you from this
approach. Having users enter data via parameter prompts gives a too
high (in my opinion) probability of error. Here's what I would do...

Make a simple little unbound form, with an unbound textbox, and a
command button. Set the Format property of the textbox to a valid date
format. Maybe you could set the Default Value of the textbox to Date().
Then, on the event that would trigger the need to send an email, use
an OpenForm macro to open this date entry form. And on the Click event
of the command button, another macro, where you have your SendObject
action, plus a Close action to close the date criteria form. Make
sense? Then, the Message Text argument of the send object is like this:
="Up to date as of " & [NameOfYourTextbox]
.... or, possibly, you will need:
="Up to date as of " & Format([NameOfYourTextbox],"dd\-mm\-yy")
(or whatever your desired format is).

--
Steve Schapel, Microsoft Access MVP
Not quite, sometimes the update might not be done until between 11:00am and
noon, so we don't want people who view it in the morning before it's updated
thinking that it is up to date as of that day. I just wondered if it was
possible to put some kind of parameter into the message that prompts the
sender to enter the parameter (the date) when SendObject is run
Thanks!
 

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