Ahhh yes - you are correct - that helps as I am posting one record to the database now.
Is there anything else you can see that will prevent it looping?
Main Topics
Browse All TopicsI am creating an insert statement from a dynamic recordset on Dreamweaver. I want to insert multiple rows in one table but they may vary depending upon how many are in the original recordset. I am getting the following error:
"Syntax error in INSERT INTO statement".
Help with this would be most appreciated.
The Access database table called tbl_CurrentStatus contains:
StatusID
Organisation
StatusRef
MemberID
TimeStamp ( the default value of this is now() )
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I have actually noticed that when I response write the values = Im not getting anything for the value of VarCount so as far as I can see its stopping at one.
I have requested the value now
varCountNumber = Request(VarCount)
and set the index
For i = - to varCountNumber
But Im still not getting a value writing to the page?
Thank you all for your help so far!
I have got it to the stage that if I change the for i = 0 to 2 (currently testing with three records) - all records save to the database.
Can anyone see why the varCount doesnt work?
It is dimensioned before the loop starts:
<% dim varCount
varCount = 0 %>
and increments before the loop finishes:
<%
varCount = varCount + 1
%>
Its held in currently an input field within the table below the loop (will be hidden eventually) and displays correctly on the page:
<input name="varCount" type="input" id="varCount" value="<%=Response.write(va
It is requested on the following page:
varCountNumber = CLng(Request(varCount))
I converted to a int just in case it is saving as a string and I use it as follows:
For i = 0 to varCountNumber
is still get varCountNumber = 0 when I response.write it.
Business Accounts
Answer for Membership
by: TorrwinPosted on 2009-10-27 at 08:07:23ID: 25673222
The first thing that pops out to me is there might be a typo. I think you are trying to use the word 'Organization' instead of 'Organsation', but I might be wrong.