It's seems to work fine exept for the Replace() function which does not
exist in Access 97. Can you provide me the function description then I can
replace it with something else?
After further analyze I realize that the only thing missing in my code to be
able to send msg to user was the ideas to use the NET SEND command. I was
already retrieving Computer names by reading the .ldb file.
I appreciated your help, you make me remember there is DOS command we can
use in Access.
I'm amateur in Access...Can give me some step by step guidelines on how to
implement the code...Do i hv to create specific form to accomplish the net
send msg etc
Replace CompName by the computer name (It will work with the IP too) and
replace msg by the message to send. Keep in mind CompName & msg are string
variables in my example. You need to put the information between quotation
mark if you don't use variables.
You can link this function to a button and take CompName and msg from
controls or use fixed CompName & msg.
This is VBA. Open your form in design and click "Code" toolbar button. This
is where you place those line code.
In tha case of linking the code to a button ( like my exemple ) here how to
do :
1 - Open you form in design mode.
2 - Create a new button
3 - Right click on the button and chose properties
4 - Change the button's name if you want then click on "Event" tab then
choose the "On Click" event. It will open the "Code" windows.
5 - Add the code. It should look like this :
Private Sub SendMsgBtn_Click()
On Error GoTo Err_SendMsgBtn_Click
Dim CompName As String
Dim msg As String
CompName = "MyPC"
msg = "Bla Bla Bla"
Shell ("NET SEND " & CompName & " " & msg)
Exit_SendMsgBtn_Click:
Exit Sub
Err_SendMsgBtn_Click:
MsgBox Err.Description
Resume Exit_SendMsgBtn_Click
End Sub
If you need help to get data from controls let me know.
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.