Hi
I have a button on my form and then the code from that button runs, without stepping through the code, it deletes the value of the txtRunnerNumber textbox that has been inserted by the code earlier on.
Why does the code deletes the value and not then i stepping through the code?
My code for the button is as follows:
Dim team, club As String
If Combo1.Visible = True Then
team = Combo1.Text
club = txtRunnerClub.Text
End If
If Check1 = 0 Then
Me.Data1.Recordset.AddNew
Check1 = 1
Else
Me.Data1.Recordset.Update
Me.Data1.Recordset.AddNew
End If
If Combo1.Visible = True Then
Combo1.Text = team
txtRunnerClub.Text = club
End If
Me.Data3.RecordSource = "SELECT RunnerNumber, Used FROM tblChips WHERE Used = 0"
Me.Data3.Refresh
Me.txtRunnerNumber.Text = Me.Data3.Recordset.Fields(0)
Me.Data3.Recordset.Edit
Me.Data3.Recordset.Fields(1) = True
Me.Data3.Recordset.Update
Me.txtRunnerNumber.SetFocus
/Peter
I have a button on my form and then the code from that button runs, without stepping through the code, it deletes the value of the txtRunnerNumber textbox that has been inserted by the code earlier on.
Why does the code deletes the value and not then i stepping through the code?
My code for the button is as follows:
Dim team, club As String
If Combo1.Visible = True Then
team = Combo1.Text
club = txtRunnerClub.Text
End If
If Check1 = 0 Then
Me.Data1.Recordset.AddNew
Check1 = 1
Else
Me.Data1.Recordset.Update
Me.Data1.Recordset.AddNew
End If
If Combo1.Visible = True Then
Combo1.Text = team
txtRunnerClub.Text = club
End If
Me.Data3.RecordSource = "SELECT RunnerNumber, Used FROM tblChips WHERE Used = 0"
Me.Data3.Refresh
Me.txtRunnerNumber.Text = Me.Data3.Recordset.Fields(0)
Me.Data3.Recordset.Edit
Me.Data3.Recordset.Fields(1) = True
Me.Data3.Recordset.Update
Me.txtRunnerNumber.SetFocus
/Peter