- Home
·
- Miscellaneous
·
- This will be a useful applicaton for printing a list of student's records on a form.
This will be a useful applicaton for printing a list of student's records on a form.
This will be a useful applicaton for printing a list of student's records on a form.
Rate This will be a useful applicaton for printing a list of student's records on a form.
(2(2 Vote))
'following code below and place the
'command button on a form.
'Notice I did not change the name of the form, I used the
'default name here as well as the default name for the command button
Private Sub Command1_Click()
'declarations
Const MaxStudent As Integer = 5
Dim StudentNameArray(1 To MaxStudent) As String
Dim StudentIDArray(1 To MaxStudent) As Long
Dim x
Dim Counter As Integer
Counter = 1 'initialize
Do While Counter < MaxStudent
StudentNameArray(Counter) = InputBox("Enter your name")
StudentIDArray(Counter) = Val(InputBox("Enter a student Id number"))
Counter = Counter + 1 'increment
Loop
Form1.Print " No. "; " Student Name "
Form1.Print "-------"; " -----------------"
For x = 1 To MaxStudent
Form1.Print x & StudentNameArray(x)
Next x
End Sub
This will be a useful applicaton for printing a list of student's records on a form. Comments
No comments yet — be the first to post one!
Post a Comment