home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form SendToRecipient
- BorderStyle = 3 'Fixed Dialog
- Caption = "Send"
- ClientHeight = 3195
- ClientLeft = 2760
- ClientTop = 3750
- ClientWidth = 6030
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3195
- ScaleWidth = 6030
- ShowInTaskbar = 0 'False
- Begin VB.TextBox xName
- DataField = "Name"
- DataSource = "Data1"
- Height = 375
- Left = 1200
- TabIndex = 2
- Top = 720
- Width = 2295
- End
- Begin VB.Data Data1
- Connect = "Access"
- DatabaseName = "C:\pcplus\vbwkshp\issue159\newslist.mdb"
- DefaultCursorType= 0 'DefaultCursor
- DefaultType = 2 'UseODBC
- Exclusive = 0 'False
- Height = 615
- Left = 1440
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "Recipients"
- Top = 2280
- Width = 2175
- End
- Begin VB.CommandButton Send
- Caption = "Send"
- Height = 375
- Left = 4680
- TabIndex = 1
- Top = 600
- Width = 1215
- End
- Begin VB.CommandButton OKButton
- Caption = "Exit"
- Height = 375
- Left = 4680
- TabIndex = 0
- Top = 120
- Width = 1215
- End
- Begin VB.Label Label1
- Caption = "Name"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 720
- Width = 975
- End
- Attribute VB_Name = "SendToRecipient"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub OKButton_Click()
- Me.Hide
- End Sub
- Private Sub Send_Click()
- Dim ws As Workspace, r As Integer
- Set ws = Workspaces(0)
- Dim s As String, t As String
- ws.BeginTrans
- If xName.Text <> "" Then
- With Data1.Recordset
- .Edit
- !LastIssueNumber = Code.issueNumber
- .Update
- End With
- Call SendMail(Data1.Recordset.Fields!Name, Data1.Recordset.Fields!EMail)
- MsgBox "No name selected!"
- End If
- r = MsgBox("Do you want to commit?", vbYesNo)
- If r = vbYes Then
- ws.CommitTrans
- ws.Rollback
- End If
- End Sub
-