home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
tool
/
database
/
ezacce
/
register.frm
< prev
next >
Wrap
Text File
|
1995-02-27
|
11KB
|
354 lines
VERSION 2.00
Begin Form register
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Little League Registration"
ClientHeight = 3855
ClientLeft = 480
ClientTop = 1455
ClientWidth = 8685
Height = 4260
Left = 420
LinkTopic = "dixie"
ScaleHeight = 3855
ScaleWidth = 8685
Top = 1110
Width = 8805
Begin CommandButton cmdinstructions
Caption = "&Instructions"
Height = 495
Left = 960
TabIndex = 11
TabStop = 0 'False
Top = 2220
Width = 1575
End
Begin CommandButton cmdexit
Caption = "E&XIT"
Height = 495
Left = 960
TabIndex = 10
TabStop = 0 'False
Top = 3000
Width = 1575
End
Begin Ctl3D Ctl3D1
ClassList = REGISTER.FRX:0000
Left = 120
Top = 6180
End
Begin ListBox List1
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Courier New"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 3180
Left = 3660
TabIndex = 4
TabStop = 0 'False
Top = 480
Width = 4815
End
Begin TextBox txtlname
ForeColor = &H00000000&
Height = 285
Left = 1560
MaxLength = 15
TabIndex = 0
Top = 180
Width = 1935
End
Begin TextBox txtinitial
Height = 285
Left = 1560
MaxLength = 1
TabIndex = 2
Top = 1020
Width = 255
End
Begin TextBox txtfname
Height = 285
Left = 1560
MaxLength = 15
TabIndex = 1
Top = 600
Width = 1935
End
Begin Label lblbirthdate
Alignment = 2 'Center
BackColor = &H8000000F&
BorderStyle = 1 'Fixed Single
Height = 225
Left = 1500
TabIndex = 8
Top = 1440
Width = 1395
End
Begin Label lable4
BackColor = &H8000000F&
BorderStyle = 1 'Fixed Single
Caption = "First Name Last Name MI Player no."
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Courier New"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 3660
TabIndex = 9
Top = 180
Width = 4815
End
Begin Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackColor = &H8000000F&
BorderStyle = 1 'Fixed Single
Caption = "Initial"
Height = 225
Left = 180
TabIndex = 7
Top = 1020
Width = 1155
End
Begin Label Label3
Alignment = 2 'Center
AutoSize = -1 'True
BackColor = &H8000000F&
BorderStyle = 1 'Fixed Single
Caption = "Birthdate"
Height = 225
Left = 180
TabIndex = 6
Top = 1440
Width = 1155
End
Begin Label Label2
Alignment = 2 'Center
AutoSize = -1 'True
BackColor = &H8000000F&
BorderStyle = 1 'Fixed Single
Caption = "First name"
Height = 225
Left = 180
TabIndex = 5
Top = 600
Width = 1155
End
Begin Label lblname
Alignment = 2 'Center
AutoSize = -1 'True
BackColor = &H8000000F&
BorderStyle = 1 'Fixed Single
Caption = "Last name"
Height = 225
Left = 180
TabIndex = 3
Top = 180
Width = 1155
End
End
Option Explicit
Sub cmdexit_Click ()
End
End Sub
Sub cmdinstructions_click ()
'Gives a short explanation of how to use this sample.
Dim msg, newline, tick
newline = Chr$(13) + Chr$(10)
tick = Chr$(34)
msg = msg + "This is one form of a Little League Baseball" + newline
msg = msg + "registration program written using EZAccess." + newline
msg = msg + newline
msg = msg + "Note: Before using this example you should " + newline
msg = msg + "run EZAccess on the table " + tick + "Players" + tick + " and" + newline
msg = msg + "choose " + tick + "Print" + tick + " to get a Relations Listing." + newline
msg = msg + newline
msg = msg + "Instructions:" + newline
msg = msg + newline
msg = msg + "1. Key all or part of a players last name and " + newline
msg = msg + "look at the source code required to load the " + newline
msg = msg + "list box. " + newline
msg = msg + newline
msg = msg + "2. Click on a player in the list box and look " + newline
msg = msg + "at the source code required to display their " + newline
msg = msg + "birthdate." + newline
MsgBox msg, 64, "Instructions"
End Sub
Sub Form_Load ()
'Center the form
register.Left = (screen.Width / 2) - (register.Width / 2)
register.Top = (screen.Height / 2) - (register.Height / 2)
'Get instructions
cmdinstructions_click
End Sub
Sub List1_Click ()
SeqNum = Right$(list1.Text, 4)
RK_SeqNum
lblbirthdate.Caption = birthdate
txtlname.Text = Trim$(LName)
txtfname.Text = Trim$(FName)
txtinitial.Text = Initial
txtlname.SetFocus
End Sub
Sub txtfname_GotFocus ()
'Select everything in the "First Name" text box
txtfname.SelStart = 0
txtfname.SelLength = Len(txtfname.Text)
End Sub
Sub txtfname_KeyPress (keyascii As Integer)
'Upper case everything that is typed into the text box.
keyascii = Asc(UCase$(Chr$(keyascii)))
'Blank the text box "Initial."
txtinitial.Text = ""
'Blank the text box "Birthdate."
lblbirthdate.Caption = ""
'If ENTER is pressed move to the "Initial" text box.
If keyascii = 13 Then
keyascii = 0
txtinitial.SetFocus
End If
End Sub
Sub txtfname_KeyUp (KeyCode As Integer, Shift As Integer)
'Clear the List Box
list1.Clear
'Note: Try commenting the If and End If statements out
'and see what happens.
If txtlname.Text <> "" Then
Do
'LName, FName, and Initial refer to fields in "Players."
LName = txtlname.Text 'Set the first key
FName = txtfname.Text 'Set the second key
Initial = "" 'Set the third key
' "Read Equal" for matches to the text in "Last Name" and
' "First Name."
RE_LName
'Check to see if matching records have been exhausted.
If eof_players Then Exit Do
'A matching record was found so add it to the List Box.
list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
Loop
End If
End Sub
Sub txtinitial_GotFocus ()
'Select everything in the "Initial" text box
txtinitial.SelStart = 0
txtinitial.SelLength = Len(txtinitial.Text)
End Sub
Sub txtinitial_KeyPress (keyascii As Integer)
'Upper case everything that is typed into the text box.
keyascii = Asc(UCase$(Chr$(keyascii)))
'Blank the text box "Birthdate."
lblbirthdate.Caption = ""
'If ENTER is pressed just turn off that annoying beep!
If keyascii = 13 Then
keyascii = 0
End If
End Sub
Sub txtinitial_KeyUp (KeyCode As Integer, Shift As Integer)
'Clear the List Box
list1.Clear
'Note: Try commenting the If and End If statements out
'and see what happens.
If txtlname.Text <> "" Then
Do
'LName, FName, and Initial refer to fields in "Players."
LName = txtlname.Text 'Set the first key
FName = txtfname.Text 'Set the second key
Initial = txtinitial.Text 'Set the third key
' "Read Equal" for matches to the text in "Last Name",
' "First Name" and "Initial."
RE_LName
'Check to see if matching records have been exhausted.
If eof_players Then Exit Do
'A matching record was found so add it to the List Box.
list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
Loop
End If
End Sub
Sub txtlname_GotFocus ()
'Select everything in the "Last Name" text box
txtlname.SelStart = 0
txtlname.SelLength = Len(txtlname.Text)
End Sub
Sub txtlname_KeyPress (keyascii As Integer)
'Upper case everything that is typed into the text box.
keyascii = Asc(UCase$(Chr$(keyascii)))
'Blank the text box "First Name."
txtfname.Text = ""
'Blank the text box "Initial."
txtinitial.Text = ""
'Blank the text box "Birthdate."
lblbirthdate.Caption = ""
'If ENTER is pressed move to the "First Name" text box.
If keyascii = 13 Then
keyascii = 0
txtfname.SetFocus
End If
End Sub
Sub txtlname_KeyUp (KeyCode As Integer, Shift As Integer)
'Clear the List Box
list1.Clear
'Note: Try commenting the If and End If statements out
'and see what happens.
If Trim$(txtlname.Text) <> "" Then
'LName, FName, and Initial refer to fields in "Players."
LName = txtlname.Text 'Set the first key.
FName = "" 'Set the second key.
Initial = "" 'Set the third key.
Do
' "Read Equal" for matches to the text in "Last Name."
RE_LName
'Check to see if matching records have been exhausted.
If eof_players Then Exit Do
'A matching record was found so add it to the List Box.
list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
Loop
End If
End Sub