Hi, can anyone help me with my School Project - coding pls
Thanks
Hi, can anyone help me with my School Project - coding pls
Thanks
Do you have a specific question? With what do you need help?
We don’t do people’s homework here. We are however willing to answer programming questions. If you have some code with which you need help, let us know.
Yes, I have done some coding and it’s showing errors - “Submit button”
You understand that we can’t see your code, right? Do you have a repo?
Private Sub SubmitBt_Click()
Rem Submit score to data table
If MsgBox("Submit these scores?", vbOKCancel, "Game Recording System") = vbOK Then
Rem Check data entry integrity
If TeamA = TeamB Then
MsgBox "Team entry not valid!", vbCritical, "Game Recording System"
Exit Sub
End If
If TeamA = "" Or TeamB = "" Then
MsgBox "Team entry is required!", vbCritical, "Game Recording System"
Exit Sub
End If
If ScoreA < 0 Or ScoreB < 0 Then
MsgBox "Score can not be -ve!", vbCritical, "Game Recording System"
Exit Sub
End If
Rem Initialise variables
WinA = 0
WinB = 0
DrawA = 0
DrawB = 0
PointA = 0
PointB = 0
DiffA = 0
DiffB = 0
Rem Is there a winner?
If ScoreA = ScoreB Then
Rem There is a draw
DrawA = 1
DrawB = 1
PointA = 1
PointB = 1
Else
Rem we have a winner
DiffA = ScoreA - ScoreB
DiffB = ScoreB - ScoreA
If ScoreA > ScoreB Then
Rem A is the winner
WinA = 1
PointA = 3
Else
Rem B is the winner
WinB = 1
PointB = 3
End If
End If
Call UpdateTable
Call DoNext
Else
Rem Do nothing
MsgBox "Nothing submitted", , "Game Recording System"
End If
End Sub
Private Sub DoNext()
Rem reset user interface for next data entry
TeamA.Value = ""
TeamB.Value = ""
ScoreA.Value = 0
ScoreB.Value = 0
End Sub
The code works on MS Access but can’t work on VB.2010
OK, I’ll take a look later, but I don’t know VB. This is a forum mostly devoted to web development, but maybe someone else will take a look.
When I search for “visual basic forum”, I do get some hits. You might encounter people more familiar with VB there.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.