Hi,
Im doing somnething similar but getting an error trying to replicate this code:
Table = "Card Usage"
Form= "Stock Add"
Text box for card number form = "TBcnf"
Text box for card number to = "TBcnt"
(I realise now that this acronym is a little inappropriate!!)
Button with VBA in it "Baddrange"
I modified the code to be:
Private Sub Baddrange_Click()
Dim lngCard_usage As Long
Dim strSQL As String
strSQL = "INSERT INTO card_Update (Barcode) VALUES("
For lngBarcode = Me.TBcnf To Me.TBcnt
CurrentProject.Connection.Execute _
strSQL & lngCard_usage & ");"
Next lngCard_usage
End Sub
But im getting an issue with the next command...
"Compile Error Invalid Next Control variable reference"
I dont quite understand that lng part of the code so lost on a solution, thought id add it to this thread rather than start a new one
