home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / database / ezacce / register.frm < prev    next >
Text File  |  1995-02-27  |  11KB  |  354 lines

  1. VERSION 2.00
  2. Begin Form register 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Little League Registration"
  6.    ClientHeight    =   3855
  7.    ClientLeft      =   480
  8.    ClientTop       =   1455
  9.    ClientWidth     =   8685
  10.    Height          =   4260
  11.    Left            =   420
  12.    LinkTopic       =   "dixie"
  13.    ScaleHeight     =   3855
  14.    ScaleWidth      =   8685
  15.    Top             =   1110
  16.    Width           =   8805
  17.    Begin CommandButton cmdinstructions 
  18.       Caption         =   "&Instructions"
  19.       Height          =   495
  20.       Left            =   960
  21.       TabIndex        =   11
  22.       TabStop         =   0   'False
  23.       Top             =   2220
  24.       Width           =   1575
  25.    End
  26.    Begin CommandButton cmdexit 
  27.       Caption         =   "E&XIT"
  28.       Height          =   495
  29.       Left            =   960
  30.       TabIndex        =   10
  31.       TabStop         =   0   'False
  32.       Top             =   3000
  33.       Width           =   1575
  34.    End
  35.    Begin Ctl3D Ctl3D1 
  36.       ClassList       =   REGISTER.FRX:0000
  37.       Left            =   120
  38.       Top             =   6180
  39.    End
  40.    Begin ListBox List1 
  41.       FontBold        =   -1  'True
  42.       FontItalic      =   0   'False
  43.       FontName        =   "Courier New"
  44.       FontSize        =   8.25
  45.       FontStrikethru  =   0   'False
  46.       FontUnderline   =   0   'False
  47.       ForeColor       =   &H00000000&
  48.       Height          =   3180
  49.       Left            =   3660
  50.       TabIndex        =   4
  51.       TabStop         =   0   'False
  52.       Top             =   480
  53.       Width           =   4815
  54.    End
  55.    Begin TextBox txtlname 
  56.       ForeColor       =   &H00000000&
  57.       Height          =   285
  58.       Left            =   1560
  59.       MaxLength       =   15
  60.       TabIndex        =   0
  61.       Top             =   180
  62.       Width           =   1935
  63.    End
  64.    Begin TextBox txtinitial 
  65.       Height          =   285
  66.       Left            =   1560
  67.       MaxLength       =   1
  68.       TabIndex        =   2
  69.       Top             =   1020
  70.       Width           =   255
  71.    End
  72.    Begin TextBox txtfname 
  73.       Height          =   285
  74.       Left            =   1560
  75.       MaxLength       =   15
  76.       TabIndex        =   1
  77.       Top             =   600
  78.       Width           =   1935
  79.    End
  80.    Begin Label lblbirthdate 
  81.       Alignment       =   2  'Center
  82.       BackColor       =   &H8000000F&
  83.       BorderStyle     =   1  'Fixed Single
  84.       Height          =   225
  85.       Left            =   1500
  86.       TabIndex        =   8
  87.       Top             =   1440
  88.       Width           =   1395
  89.    End
  90.    Begin Label lable4 
  91.       BackColor       =   &H8000000F&
  92.       BorderStyle     =   1  'Fixed Single
  93.       Caption         =   "First Name      Last Name      MI Player no."
  94.       FontBold        =   -1  'True
  95.       FontItalic      =   0   'False
  96.       FontName        =   "Courier New"
  97.       FontSize        =   8.25
  98.       FontStrikethru  =   0   'False
  99.       FontUnderline   =   0   'False
  100.       Height          =   255
  101.       Left            =   3660
  102.       TabIndex        =   9
  103.       Top             =   180
  104.       Width           =   4815
  105.    End
  106.    Begin Label Label1 
  107.       Alignment       =   2  'Center
  108.       AutoSize        =   -1  'True
  109.       BackColor       =   &H8000000F&
  110.       BorderStyle     =   1  'Fixed Single
  111.       Caption         =   "Initial"
  112.       Height          =   225
  113.       Left            =   180
  114.       TabIndex        =   7
  115.       Top             =   1020
  116.       Width           =   1155
  117.    End
  118.    Begin Label Label3 
  119.       Alignment       =   2  'Center
  120.       AutoSize        =   -1  'True
  121.       BackColor       =   &H8000000F&
  122.       BorderStyle     =   1  'Fixed Single
  123.       Caption         =   "Birthdate"
  124.       Height          =   225
  125.       Left            =   180
  126.       TabIndex        =   6
  127.       Top             =   1440
  128.       Width           =   1155
  129.    End
  130.    Begin Label Label2 
  131.       Alignment       =   2  'Center
  132.       AutoSize        =   -1  'True
  133.       BackColor       =   &H8000000F&
  134.       BorderStyle     =   1  'Fixed Single
  135.       Caption         =   "First name"
  136.       Height          =   225
  137.       Left            =   180
  138.       TabIndex        =   5
  139.       Top             =   600
  140.       Width           =   1155
  141.    End
  142.    Begin Label lblname 
  143.       Alignment       =   2  'Center
  144.       AutoSize        =   -1  'True
  145.       BackColor       =   &H8000000F&
  146.       BorderStyle     =   1  'Fixed Single
  147.       Caption         =   "Last name"
  148.       Height          =   225
  149.       Left            =   180
  150.       TabIndex        =   3
  151.       Top             =   180
  152.       Width           =   1155
  153.    End
  154. End
  155. Option Explicit
  156.  
  157. Sub cmdexit_Click ()
  158.     
  159.     End
  160.  
  161. End Sub
  162.  
  163. Sub cmdinstructions_click ()
  164.  
  165. 'Gives a short explanation of how to use this sample.
  166.     Dim msg, newline, tick
  167.     newline = Chr$(13) + Chr$(10)
  168.     tick = Chr$(34)
  169.     msg = msg + "This is one form of a Little League Baseball" + newline
  170.     msg = msg + "registration program written using EZAccess." + newline
  171.     msg = msg + newline
  172.     msg = msg + "Note: Before using this example you should " + newline
  173.     msg = msg + "run EZAccess on the table " + tick + "Players" + tick + " and" + newline
  174.     msg = msg + "choose " + tick + "Print" + tick + " to get a Relations Listing." + newline
  175.     msg = msg + newline
  176.     msg = msg + "Instructions:" + newline
  177.     msg = msg + newline
  178.     msg = msg + "1. Key all or part of a players last name and " + newline
  179.     msg = msg + "look at the source code required to load the " + newline
  180.     msg = msg + "list box. " + newline
  181.     msg = msg + newline
  182.     msg = msg + "2. Click on a player in the list box and look " + newline
  183.     msg = msg + "at the source code required to display their " + newline
  184.     msg = msg + "birthdate." + newline
  185.  
  186.     MsgBox msg, 64, "Instructions"
  187.  
  188. End Sub
  189.  
  190. Sub Form_Load ()
  191.     
  192. 'Center the form
  193.     register.Left = (screen.Width / 2) - (register.Width / 2)
  194.     register.Top = (screen.Height / 2) - (register.Height / 2)
  195. 'Get instructions
  196.     cmdinstructions_click
  197.  
  198. End Sub
  199.  
  200. Sub List1_Click ()
  201.     
  202.     SeqNum = Right$(list1.Text, 4)
  203.     RK_SeqNum
  204.     lblbirthdate.Caption = birthdate
  205.     txtlname.Text = Trim$(LName)
  206.     txtfname.Text = Trim$(FName)
  207.     txtinitial.Text = Initial
  208.     txtlname.SetFocus
  209.  
  210. End Sub
  211.  
  212. Sub txtfname_GotFocus ()
  213.  
  214. 'Select everything in the "First Name" text box
  215.     txtfname.SelStart = 0
  216.     txtfname.SelLength = Len(txtfname.Text)
  217.  
  218. End Sub
  219.  
  220. Sub txtfname_KeyPress (keyascii As Integer)
  221.  
  222. 'Upper case everything that is typed into the text box.
  223.     keyascii = Asc(UCase$(Chr$(keyascii)))
  224. 'Blank the text box "Initial."
  225.     txtinitial.Text = ""
  226. 'Blank the text box "Birthdate."
  227.     lblbirthdate.Caption = ""
  228. 'If ENTER is pressed move to the "Initial" text box.
  229.     If keyascii = 13 Then
  230.         keyascii = 0
  231.         txtinitial.SetFocus
  232.     End If
  233.  
  234. End Sub
  235.  
  236. Sub txtfname_KeyUp (KeyCode As Integer, Shift As Integer)
  237.     
  238. 'Clear the List Box
  239.     list1.Clear
  240. 'Note: Try commenting the If and End If statements out
  241. 'and see what happens.
  242.     If txtlname.Text <> "" Then
  243.         Do
  244. 'LName, FName, and Initial refer to fields in "Players."
  245.             LName = txtlname.Text  'Set the first key
  246.             FName = txtfname.Text  'Set the second key
  247.             Initial = ""           'Set the third key
  248. ' "Read Equal" for matches to the text in "Last Name" and
  249. ' "First Name."
  250.             RE_LName
  251. 'Check to see if matching records have been exhausted.
  252.             If eof_players Then Exit Do
  253. 'A matching record was found so add it to the List Box.
  254.             list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
  255.         Loop
  256.     End If
  257.  
  258. End Sub
  259.  
  260. Sub txtinitial_GotFocus ()
  261.  
  262. 'Select everything in the "Initial" text box
  263.     txtinitial.SelStart = 0
  264.     txtinitial.SelLength = Len(txtinitial.Text)
  265.  
  266. End Sub
  267.  
  268. Sub txtinitial_KeyPress (keyascii As Integer)
  269.  
  270. 'Upper case everything that is typed into the text box.
  271.     keyascii = Asc(UCase$(Chr$(keyascii)))
  272. 'Blank the text box "Birthdate."
  273.     lblbirthdate.Caption = ""
  274. 'If ENTER is pressed just turn off that annoying beep!
  275.     If keyascii = 13 Then
  276.         keyascii = 0
  277.     End If
  278.  
  279. End Sub
  280.  
  281. Sub txtinitial_KeyUp (KeyCode As Integer, Shift As Integer)
  282.  
  283. 'Clear the List Box
  284.     list1.Clear
  285. 'Note: Try commenting the If and End If statements out
  286. 'and see what happens.
  287.     If txtlname.Text <> "" Then
  288.         Do
  289. 'LName, FName, and Initial refer to fields in "Players."
  290.             LName = txtlname.Text     'Set the first key
  291.             FName = txtfname.Text     'Set the second key
  292.             Initial = txtinitial.Text 'Set the third key
  293. ' "Read Equal" for matches to the text in "Last Name",
  294. ' "First Name" and "Initial."
  295.             RE_LName
  296. 'Check to see if matching records have been exhausted.
  297.             If eof_players Then Exit Do
  298. 'A matching record was found so add it to the List Box.
  299.             list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
  300.         Loop
  301.     End If
  302.  
  303. End Sub
  304.  
  305. Sub txtlname_GotFocus ()
  306.  
  307. 'Select everything in the "Last Name" text box
  308.     txtlname.SelStart = 0
  309.     txtlname.SelLength = Len(txtlname.Text)
  310.  
  311. End Sub
  312.  
  313. Sub txtlname_KeyPress (keyascii As Integer)
  314.  
  315. 'Upper case everything that is typed into the text box.
  316.     keyascii = Asc(UCase$(Chr$(keyascii)))
  317. 'Blank the text box "First Name."
  318.     txtfname.Text = ""
  319. 'Blank the text box "Initial."
  320.     txtinitial.Text = ""
  321. 'Blank the text box "Birthdate."
  322.     lblbirthdate.Caption = ""
  323. 'If ENTER is pressed move to the "First Name" text box.
  324.     If keyascii = 13 Then
  325.         keyascii = 0
  326.         txtfname.SetFocus
  327.     End If
  328.  
  329. End Sub
  330.  
  331. Sub txtlname_KeyUp (KeyCode As Integer, Shift As Integer)
  332.     
  333. 'Clear the List Box
  334.     list1.Clear
  335. 'Note: Try commenting the If and End If statements out
  336. 'and see what happens.
  337.     If Trim$(txtlname.Text) <> "" Then
  338. 'LName, FName, and Initial refer to fields in "Players."
  339.         LName = txtlname.Text  'Set the first key.
  340.         FName = ""             'Set the second key.
  341.         Initial = ""           'Set the third key.
  342.         Do
  343. ' "Read Equal" for matches to the text in "Last Name."
  344.             RE_LName
  345. 'Check to see if matching records have been exhausted.
  346.             If eof_players Then Exit Do
  347. 'A matching record was found so add it to the List Box.
  348.             list1.AddItem FName + " " + LName + " " + Initial + " " + SeqNum
  349.         Loop
  350.      End If
  351.  
  352. End Sub
  353.  
  354.