I am running ACCESS 2000.
I have stripped this down to the bare bones to figure it out. I am stumped.
i have a table named TRADES. It has 1 field in it which is also the primary key.
When I run the code below, the DoCmd.RunSql displays a window prompting me to enter the value.
I don't want a prompt . I want to loop throught the entire record set
and load the table with a record without a prompt.
What am I doing wrong??
tradeno: is a field in the table Trades. It is a primary key
reccount: is a variable field that I add to each time a process a record
--------------------------------------------------
mysqlstring = "INSERT INTO Trades (tradeno) values (reccount) "
Do Until rst.EOF
profit = profit + 1
reccount = reccount + 1
DoCmd.RunSQL mysqlstring
GoTo GetNextRec
GetNextRec:
rst.MoveNext
Loop
End Sub
I have stripped this down to the bare bones to figure it out. I am stumped.
i have a table named TRADES. It has 1 field in it which is also the primary key.
When I run the code below, the DoCmd.RunSql displays a window prompting me to enter the value.
I don't want a prompt . I want to loop throught the entire record set
and load the table with a record without a prompt.
What am I doing wrong??
tradeno: is a field in the table Trades. It is a primary key
reccount: is a variable field that I add to each time a process a record
--------------------------------------------------
mysqlstring = "INSERT INTO Trades (tradeno) values (reccount) "
Do Until rst.EOF
profit = profit + 1
reccount = reccount + 1
DoCmd.RunSQL mysqlstring
GoTo GetNextRec
GetNextRec:
rst.MoveNext
Loop
End Sub