View Full Version : Message Box to appear when the number 14 shows in a query
blanchard 03-26-2009, 03:27 AM Hello All,
I'm after a Message Box appearing when the number 14 shows in a query.
I have set up a Macro for a message box and called it "SendEmailInvitation", and have run the macro to see if it works and it does.
How do I associate the SendEmailInvitation Macro to show when the number 14 shows in my Query list?
Please
Regards blanchard
DCrake 03-26-2009, 03:36 AM Why not simply set the criteria to = 14 and then all the records in the query require an invite?
blanchard 03-26-2009, 03:37 AM yes i like your thinking that's brilliant thanks.
blanchard 03-26-2009, 03:49 AM This part I've done
Why not simply set the criteria to = 14
But this part don't know how to do
and then all the records in the query require an invite?
:confused:
DCrake 03-26-2009, 03:57 AM How are you applying this thinking, typical example ...
blanchard 03-26-2009, 04:05 AM I opened up the Query Design window then inputted =14 into the Criteria under the field of which it applies. But then I thought if I right click on the box I just typed =14 & then select Build... then this will open the Expression Builder window and at this point I was trying to look for something with regards to sending an invite message box.
That's my thinking
DCrake 03-26-2009, 04:35 AM Tables are for storing data
Queries are for viewing data
Forms are for capturing data
Reports are for Printing data
You would create a form that has the query for its recordsource It is there that you would put a message box. But I still do not know what you are attempting to acheive.
blanchard 03-26-2009, 04:50 AM I've created a message box and saved as a macro.
How do I make the message box appear?
Is there more than one way of achieving this?
blanchard 03-26-2009, 05:11 AM it's ok I'll not bother with the message as I don't really need it. But thanks for all you help.
gemma-the-husky 03-26-2009, 05:11 AM can we go back to the start
what do you mean
"when the number 14 shows in a query"
DCrake 03-27-2009, 01:01 AM Dave.
Leave it.
The 14 represents the number of calculated days between one eventa nd another. The poster somehow wanted a messagebox to appear to say that the peron needed an email notification of some sort. But thought that when you click on the record in datasheet view a message box would appear if it was 14 days hence.
Took me a while to grasp that, but it now seems that he has given up on his initial idea. I have not PM'd you this fact because I am confident he will not revist this post. If he does then I hope he has learned something from the advice he has been given.
David
blanchard 03-27-2009, 03:13 AM This part is correct :)
The 14 represents the number of calculated days between one eventa nd another. The poster somehow wanted a messagebox to appear to say that the peron needed an email notification of some sort.
This part incorrect :confused:
But thought that when you click on the record in datasheet view a message box would appear if it was 14 days hence.
I wanted a message box to appear upon opening the Query.
And yes I have learnt things and have to say that this forum is the best that I've found so far. I think the key is for me to read up on code for the module and then we're laughin'.:D
I could do to find some website with tutorials on it really and just go through them. I've got an ebook now so this may help too.:)
DCrake 03-27-2009, 03:51 AM I wanted a message box to appear upon opening the Query.
Yes, but where are you opening the query from? Doing it directly from the control centre you would be selecting the query knowing that the contents of the query match your condition.
If the query is the underlying recordsource for a form then opening the form and viewing the contents is evidence enough for the user to see.
blanchard 03-27-2009, 04:08 AM I understand that when I open the Query I'll see the result I'm after
and having a message box appear will also verify that.
I know I don't need a message box to tell me as I can see it on the Query.
But I've been asked if this is possible.
gemma-the-husky 03-27-2009, 04:49 AM a query is a query, and wont open a msgbox on its own
you could either
a) use the query as base for a form, and provide this functionality on the form
b) within the query, limit it to those events/applicants that meet your 14 day criteria - then show these on a form, or even directly raise emails etc based on that query
whatever, you can't do this directly by a query, you need a form to control the interface - but you can use a query to help "manage" your process
blanchard 03-27-2009, 04:57 AM ok thanks Dave and DCrake you have both been great helps.
|