
November 14th, 2002, 03:21 AM
|
|
Junior Member
|
|
Join Date: Nov 2002
Location: Florida
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
MAPI Controls & Sequential Access files
I am trying to make a command button in a program I currently use not only print information - but also go through a control array (From 0 to 57) and for each part of the array that belongs to a certain user - I want it to store the information on that user in a sequential access file (I think) and then at the end of the From statement I want it to e-mail a message to the user who has checked out this particular equipment. Here is the code from my cmdPrint button. Please help. It is e-mailing a message to the user but is not placing the information needed in the e-mail.
Quote: Private Sub cmdPrint_Click()
Dim intNumber As Integer, strFileName As String, udtHistoryRec As HistoryStruc
cmdPrint.Visible = False
cmdRemind.Visible = False
lblAcc.Visible = False
imgBack.Visible = False
imgTop.Visible = False
imgBottom.Visible = False
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
strFileName = "MailTemp"
Open strFileName For Output As #2
For intNumber = 0 To 57
If lblGname(intNumber).BackColor = vbRed Then
If lblGname(intNumber).Caption <> lblUser.Caption Then
lblGname(intNumber).BackColor = vbYellow
lblDate1(intNumber).BackColor = vbYellow
End If
End If
If lblGname(intNumber).Caption = lblUser.Caption Then
Write #2, lblGun(intNumber).Caption
lblGname(intNumber).BackColor = vbMagenta
lblDate1(intNumber).BackColor = vbMagenta
End If
Next intNumber
PrintForm
For intNumber = 0 To 57
If lblGname(intNumber).BackColor <> vbWhite Then
lblGname(intNumber).BackColor = vbRed
lblDate1(intNumber).BackColor = vbRed
End If
Next intNumber
Close #2
MAPIMessages1.Compose
MAPIMessages1.RecipDisplayName = lblUser.Caption & " 8243"
MAPIMessages1.MsgSubject = "You've Got Equipment Checked Out! - A message from your friendly computer room" MAPIMessages1.MsgNoteText = strFileName
MAPIMessages1.ResolveName
MAPIMessages1.Send
MAPISession1.SignOff
cmdPrint.Visible = True
imgBack.Visible = True
imgTop.Visible = True
imgBottom.Visible = True
cmdRemind.Visible = True
lblAcc.Visible = True
End Sub |
|