Looking at your original code I see your loop is not properly defined. See the new code below.
Assuming you name your text box txtNumbertoCreate, the following code should work:
Private Sub cmdSubmit_Click()
Dim A As Integer
Dim strsql As String
If IsNull(cboTeam) Or IsNull(cboName) Or IsNull(cboActivity) Then
MsgBox "You have not selected all details, please try again."
Else
‘This line converts the value entered on the textbox to interger, necessary in order to meet the defined A as integer criteria.
A = Cint(txtNumbertoCreate.value)
‘Checks to see if the converted value is greater than Zero
If A > 0 Then
'Start the loop and continue until the value of A = 0
Do Until A = 0
‘This section was left unchanged, make sure to test it separately to ensure the statement is valid.
strsql = "INSERT INTO tblLog (Date, Time, AgentName, Team, Activity, RefNo) " & _
"Values ('" & Me.txtDate & "', '" & _
Me.txtTime & "', '" & _
Me.cboName & "', '" & _
Me.cboTeam & "', '" & _
Me.cboActivity & "', '" & _
Me.txtRefno & "');"
Me.txtBox1 = Me.cboName
Me.txtBox2 = Me.cboTeam
DoCmd.RunCommand acCmdSaveRecord
DoCmd.GoToRecord , , acNewRec
Me.cboName = Me.txtBox1
Me.cboTeam = Me.txtBox2
cboActivity.Value = Not Null
txtRefno.Value = Not Null
txtRefno.Enabled = False
'End of un changed section
’Subtracts 1 from the original value of A and loops
A = A - 1
Loop
End If
End If
End Sub