I eventually got it to work now, I took the while out which was causing most of my problems I think, and then just added all the code manually which is a little messy, but is doing the job.
There is one funny thing that I have noticed, and Im not sure if its got to do with my database or not.
My photos are named in numerical order 1-62. When the page is loaded images
I think this is an error with the information being passed between access and dw. Is there a fix for this, or am I doing something wrong?