S
Simon Harris
Hi All,
When I call this sub:
Public Sub MakePitches(intSiteID, intReqPitchQty)
Dim i As Integer, strSQL As String
DoCmd.SetWarnings ("off")
For i = 0 To intReqPitchQty
'strSQL = "insert into TBL_Pitches (ParkID, PitchNumber) values
(" & intSiteID & ", " & i & ")"
'DoCmd.RunSQL (strSQL)
Next
DoCmd.SetWarnings ("on")
End Sub
Using:
Call MakePitches(3, 31)
I get the following error:
"An expression you entered is the wrong data type for one of the arguments"
I have also tried setting up my sub like this:
Public Sub MakePitches(intSiteID as Integer, intReqPitchQty as Integer)
Any ideas/suggestions will be much appreciated!
Thanks,
Simon.
When I call this sub:
Public Sub MakePitches(intSiteID, intReqPitchQty)
Dim i As Integer, strSQL As String
DoCmd.SetWarnings ("off")
For i = 0 To intReqPitchQty
'strSQL = "insert into TBL_Pitches (ParkID, PitchNumber) values
(" & intSiteID & ", " & i & ")"
'DoCmd.RunSQL (strSQL)
Next
DoCmd.SetWarnings ("on")
End Sub
Using:
Call MakePitches(3, 31)
I get the following error:
"An expression you entered is the wrong data type for one of the arguments"
I have also tried setting up my sub like this:
Public Sub MakePitches(intSiteID as Integer, intReqPitchQty as Integer)
Any ideas/suggestions will be much appreciated!

Thanks,
Simon.