📄 frmadd.frm
字号:
VERSION 5.00
Begin VB.Form frmAdd
BorderStyle = 3 'Fixed Dialog
Caption = "Add A Patient"
ClientHeight = 4935
ClientLeft = 4290
ClientTop = 3285
ClientWidth = 6630
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4935
ScaleWidth = 6630
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 495
Left = 4200
TabIndex = 13
Top = 4080
Width = 1215
End
Begin VB.CommandButton cmdAdd
Caption = "Add Patient Record"
Height = 495
Left = 1200
TabIndex = 12
Top = 4080
Width = 1215
End
Begin VB.TextBox txtInsPolicy
Height = 285
Left = 2040
TabIndex = 11
Top = 3360
Width = 2415
End
Begin VB.TextBox txtInsured
Height = 285
Left = 1320
TabIndex = 10
Top = 3000
Width = 3735
End
Begin VB.TextBox txtInsName
Height = 285
Left = 1440
TabIndex = 9
Top = 2640
Width = 4095
End
Begin VB.TextBox txtPhone
Height = 285
Left = 840
TabIndex = 8
Top = 1920
Width = 1695
End
Begin VB.TextBox txtZipCode
Height = 285
Left = 5160
TabIndex = 7
Top = 1560
Width = 1215
End
Begin VB.TextBox txtState
Height = 285
Left = 3720
TabIndex = 6
Top = 1560
Width = 375
End
Begin VB.TextBox txtCity
Height = 285
Left = 600
TabIndex = 5
Top = 1560
Width = 2295
End
Begin VB.TextBox txtAddress
Height = 285
Left = 1320
TabIndex = 4
Top = 1200
Width = 5175
End
Begin VB.TextBox txtLast
Height = 285
Left = 1080
TabIndex = 1
Top = 120
Width = 2055
End
Begin VB.TextBox txtMiddle
Height = 285
Left = 4560
TabIndex = 3
Top = 480
Width = 375
End
Begin VB.TextBox txtFirst
Height = 285
Left = 1320
TabIndex = 2
Top = 480
Width = 1935
End
Begin VB.Line lin1
BorderWidth = 2
X1 = 120
X2 = 6480
Y1 = 960
Y2 = 960
End
Begin VB.Label lblInsPolicy
Caption = "Insurance Policy Number:"
Height = 255
Left = 120
TabIndex = 23
Top = 3360
Width = 1815
End
Begin VB.Label lblInsured
Caption = "Insured Name:"
Height = 255
Left = 120
TabIndex = 22
Top = 3000
Width = 1095
End
Begin VB.Label lblInsName
Caption = "Insurance Name:"
Height = 255
Left = 120
TabIndex = 21
Top = 2640
Width = 1215
End
Begin VB.Line lin2
BorderWidth = 2
X1 = 120
X2 = 6480
Y1 = 2400
Y2 = 2400
End
Begin VB.Label lblPhone
Caption = "Phone:"
Height = 255
Left = 120
TabIndex = 20
Top = 1920
Width = 615
End
Begin VB.Label lblZipCode
Caption = "Zip Code:"
Height = 255
Left = 4320
TabIndex = 19
Top = 1560
Width = 735
End
Begin VB.Label lblState
Caption = "State:"
Height = 255
Left = 3120
TabIndex = 18
Top = 1560
Width = 495
End
Begin VB.Label lblCity
Caption = "City:"
Height = 255
Left = 120
TabIndex = 17
Top = 1560
Width = 375
End
Begin VB.Label lblAddress
Caption = "Street Address:"
Height = 255
Left = 120
TabIndex = 16
Top = 1200
Width = 1095
End
Begin VB.Label lblLast
Caption = "Last Name:"
Height = 255
Left = 120
TabIndex = 15
Top = 120
Width = 855
End
Begin VB.Label Label1
Caption = "Middle Initial:"
Height = 255
Left = 3480
TabIndex = 14
Top = 480
Width = 975
End
Begin VB.Label lblFirst
Caption = "First Name:"
Height = 255
Left = 360
TabIndex = 0
Top = 480
Width = 855
End
End
Attribute VB_Name = "frmAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'******************************************************
'Medi-Assist - Program Dossier
'frmAdd
'Puraj Pravinchandra Patel
'Carlisle School - Martinsville, Virginia USA
'Computer Used: Pentium II 233, 144MB SDRAM, Windows 98
'Microsoft Visual Basic 6.0
'23 March 2000
'This form is responsible for adding patient records
'to a file.
'******************************************************
Option Explicit
'declare User Defined Type for Patient Record
Private Type PatientRecord
strLast As String * 20
strFirst As String * 20
strMiddle As String * 1
strAddress As String * 55
strCity As String * 25
strState As String * 2
strZipCode As String * 10
strPhone As String * 14
strInsName As String * 45
strInsured As String * 40
strInsPolicy As String * 25
End Type
Private Sub cmdAdd_Click()
'declare local variables
Dim udtPatient As PatientRecord
Dim intFileNum As Integer, lngLen As Long, lngNumRec As Long
'open database for adding new patient record
intFileNum = FreeFile
lngLen = LenB(udtPatient)
Open "c:\data.puj" For Random As #intFileNum Len = lngLen
'retreive number of records
lngNumRec = NumRecords(intFileNum, lngLen)
'check if user entered correct data
If txtLast.Text = "" Then
'Display error message
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -