D
dfeigen115
When running the code (see below), I receive the following error (after the
msgbox displays):
Run-time error '3125':
" is not a valid name. Make sure that it does not include invalid
characters or punctuation and that it is not too long.
The debug function highlights the docmd.runsql statement. Any assistance
would be appreciated (fyi, I'm running access 2003)
=====start code=====
Dim intCurrentRow As Integer
For intCurrentRow = 0 To Me.ExtendChargeNumber.ListCount - 1
If Me.ExtendChargeNumber.Selected(intCurrentRow) Then
MsgBox (Me.CACRNumber & " " & Me.ExtendChargeNumber.Column(0,
intCurrentRow) & " " & Me.ExtendDate)
DoCmd.RunSQL "INSERT INTO ExtendChargeNumbers
([CACRNumber],[ExtendChargeNumber],[ExtendDate]) VALUES
(Me.CACRNumber,[me.ExtendChargeNumber.Column(0,intCurrentRow)],Me.ExtendDate)"
End If
Next intCurrentRow
==========end code=========
Thanks in advance, Dan
msgbox displays):
Run-time error '3125':
" is not a valid name. Make sure that it does not include invalid
characters or punctuation and that it is not too long.
The debug function highlights the docmd.runsql statement. Any assistance
would be appreciated (fyi, I'm running access 2003)
=====start code=====
Dim intCurrentRow As Integer
For intCurrentRow = 0 To Me.ExtendChargeNumber.ListCount - 1
If Me.ExtendChargeNumber.Selected(intCurrentRow) Then
MsgBox (Me.CACRNumber & " " & Me.ExtendChargeNumber.Column(0,
intCurrentRow) & " " & Me.ExtendDate)
DoCmd.RunSQL "INSERT INTO ExtendChargeNumbers
([CACRNumber],[ExtendChargeNumber],[ExtendDate]) VALUES
(Me.CACRNumber,[me.ExtendChargeNumber.Column(0,intCurrentRow)],Me.ExtendDate)"
End If
Next intCurrentRow
==========end code=========
Thanks in advance, Dan