I have a Table tblMsgBank that has an LoginID and A Message field. I have a function that when it is called from a command button on a form is supposed to send all of the messages but for some reason it is only sending out one or two of the messages. Does anyone have an Idea Why?
Here is an example of the code:
Function Send
Dim rst as DAO.Recordset
Dim i as integer
'create a recordset from your table
Set rst = CurrentDb.OpenRecordset("tblMsgBank"
'create a counter for the loop (i)
'the index starts at 0 for the 1st record
'Start the loop
With rst
For i = 0 to .Recordcount - 1
Shell ("net send " & !LoginID & " " & !Message & ""
.MoveNext
Next i
End With
rst.Close
set rst = Nothing
End Function
Christopher Abney
"There is no limit to the good you can do if you dont care who gets the credit"
[Afro]
Here is an example of the code:
Function Send
Dim rst as DAO.Recordset
Dim i as integer
'create a recordset from your table
Set rst = CurrentDb.OpenRecordset("tblMsgBank"
'create a counter for the loop (i)
'the index starts at 0 for the 1st record
'Start the loop
With rst
For i = 0 to .Recordcount - 1
Shell ("net send " & !LoginID & " " & !Message & ""
.MoveNext
Next i
End With
rst.Close
set rst = Nothing
End Function
Christopher Abney
"There is no limit to the good you can do if you dont care who gets the credit"
[Afro]