var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Creating a loop to write records
I have a table, I have the sql statement I want, how do I write a loop to write these to a text file.
I could write
And idea of what I am looking for is this
Thanks for any help, as I have tried everything...
Dim size as Integer
Dim i as Integer
i = 1
size = 1
For i = 1 To client_a_size
size = size +1
I'm guessing you have tried everything except "docmd.TransferText" which exports data quite nicely.
In database programming, you need to think more in terms of set-based operations rather than looping single-record actions.
I have not tried that. I did manage to get my loop to work, but seeing as how I am new to Databases, I will definitley read up on that this afternoon. Thanks for the tip!
First, create a recordset of the records you want to write to a file. There's more to it, but I'm not at my usual computer right now so I don't have a sample handy.
Something like this:
strSQL = "SELECT * from Z"
rst = currentdb.openrecordset(strSQL)
Do while not rst.eof