Send msg via command prompt

deere8585

Registered User.
Local time
Today, 04:32
Joined
Jun 26, 2008
Messages
27
I have a command button within a form,

When the user clicks on the this command button I wish for my db to-
  1. Run a qry to colate the necessary info
  2. Open Windows command prompt
  3. Transfer the info provided by the qry into command prompt as text (with the idea of using the messenger service)
  4. send the message.
Looking through this forum & googling it appears that sending an email via outlook is the most popular method using the docmd.sendobject- is this something that could be adapted to open command prompt?

I'm fairly certain that I can build the qry it's just how I tranfer that information to command prompt messenger that is baffling me at the moment.

As always any advice or assistance is greatly appreciated-even if it's just pointing me to the correct article that I have managed to overlook!
 
why the command window?

i suspect you need to pipe it in some way, but never needed to do it, and not sure how you would do it
 
You can use the API Netsend to send messages to other computers if you have the correct config to start with.

David
 
Gemma-The users are all on a small network but do not want to use MS Outlook, what I'm trying to do is spread information around using the net send command on the command prompt messenger-so for example user 1 enters a record and clicks on a command button & a pop up box will appear on user 2's moniter stating that a record has been entered on the db for their attention.

DCrake-This sounds very much like the process I am trying to utilise- Is there any further info you could share with me with regard to setting up the correct config?

Thanks again for any help
 
Are wanting it to send it if they have access open only or at any time the sender sends the message?
 
The user sending the message will have access open when the message is sent at all times- I am hoping to tie this in to an 'on click' event from a command button.
The user recieving the message may not have access open- this was my thinking behind using the command prompt messenger- that the user would be prompted to open up access & deal with the record
 
What I'm attempting at the moment is on the on click event:

Shell ("net send" & "mycomputername" & "" & "mymessage")

This brings up the command prompt tab for a split second but then it disappears again before i can check to see if there are any errors & the msgbox does not appear on screen so I'm presuming it has not worked!

am I formatting my shell command incorrectly?
 
your shell command is "net sendmycomputernamemymessage"
---> it's incorrect

following code:

Shell ("net send " & "mycomputername" & " " & "mymessage")
-->"net send mycomputername mymessage"
 
I didn't think there were any Windows PCs left with the messaging service still enabled - because of security vulnerabilities.

Would the users be amenable to the idea of having a small Access or VB monitor program running (i.e. if you were to create your own messaging app - it could be set up to periodically check for new records in a table of messages)
 
Just had a thought! When you said you would like to inform them of pending orders even if they are not in Access, why not send them an email from Access and if Outlook is configured correctly the small incoming email notification dialog box will appear.

If you are nominating a person or a group of people to who need to action the order then either send it to them directly or to an email group. Be alot simpler and you will have traceability that the message went out. Using netsend will send the message to the client pc but once they have clicked on it you have no proof you sent the message unless you log this somewhere. Depending on the nature of the order this can be critical if the task is overlooked or fogotten about. At least it will still sit in their inbox.

Like I said just a thought.

David
 
Hien Muoi- Thanks for pointing out my error in spacing! This seems to be my constant failing when it comes to code- It has taken me a further 20mins to realise that I need another " " to code correctly!

My final code =
Shell ("net send" & " " & "mycomputername" & " " & "mymsg")
Works perfectly!

Mike
It's a bit of an out-moded concept I appreciate- all pc's still have the messenger service within them but from XP service pack 2 & onwards it has been de-activated.

For anyone interested in using this concept, to re-activate the messenger service you need to-
a) Right click on My Computer
b) From the list that appears select - Manage
c) Expand the services option in the left hand box- then click on Services
d) In the right hand box double click Messenger - This will bring up the messenger dialog box
e) In the Start Up drop down box select Automatic
f) Finally click Apply then Start - The net send command should now operate

****Warning- Before you activate the messenger service make sure you have a decent firewall up that will filter off NetBios & UDP- otherwise you will get all sorts of annoying popup box appearing & possibly worse*****

Mike & DCrake - Thanks for the suggestions, to my mind they would offer a more robust solution but my user is pretty insistant that this is how they want the db to work?!
I'd be interested in learning more about these alternatives though as they sound like they would come in very handy for a more advanced db communication tool in the future!

Once again thank you all for taking the time to point me in the right direction!
 
Mike & DCrake - Thanks for the suggestions, to my mind they would offer a more robust solution but my user is pretty insistant that this is how they want the db to work?!
I realise there is often no choice (due to employment conditions, or other contractual constraints) than to give the user what he or she strenuously demands.
I don't envy you this position though, because you know what's likely to happen, don't you? - the user demands that it is done in some arcane, unconventional way, then the same user later complains that the system is unreliable garbage - and will insist that it's your fault for implementing it that way.

I'd be interested in learning more about these alternatives though as they sound like they would come in very handy for a more advanced db communication tool in the future!
I don't know if it's ever really been done, but I've often thought of creating what is essentially a message board (like this one), but in Access - for small companies to use within their offices.

In its most basic form though, you could implement a messaging system by having a back end db with a table of messages, along with date sent, sender and recipient details and maybe a read/unread flag, then have a small front end application that allows users to append new message records into that table, and allows them to see new/unread message records addressed for them. It would also be possible for other programs to create messages into the table.

But I am interested to know... does this company just not use email at all?
 

Users who are viewing this thread

Back
Top Bottom