john-86
03-27-2006, 06:24 AM
Hello all, back for a lil more help if you don't mind.
I've set up a tabular form (actually a sub form) which has three unbound text boxes in it. There are two possibilities as two what these boxes may be populated with based on whether or not the record has an entry in another table. I've written code to distinguish between the two possibilities, but the values that are populated in the first record are just duplicated through the rest of the recordset (e.g. if the first box said "hello" all other boxes would say "hello").
It is as if the code that I wrote to distinguish between the two possibilities worked for the first record and then was not executed for the rest of the recordset. Instead a copy of the results from the first record is filled in for all records.
I know it all sounds a little vague. I'm trying to be as concise as possible. The only way I could explain it properly would be to type out the whole scenario, which I'm sure you busy people have no time for.
I was wondering if there was a way I could use a for each loop? Something along the lines of:
For Each Record in myRecordset
**code to distinguish between two possibilities**
Next
etc.
Thanks for your time everyone,
John
I've set up a tabular form (actually a sub form) which has three unbound text boxes in it. There are two possibilities as two what these boxes may be populated with based on whether or not the record has an entry in another table. I've written code to distinguish between the two possibilities, but the values that are populated in the first record are just duplicated through the rest of the recordset (e.g. if the first box said "hello" all other boxes would say "hello").
It is as if the code that I wrote to distinguish between the two possibilities worked for the first record and then was not executed for the rest of the recordset. Instead a copy of the results from the first record is filled in for all records.
I know it all sounds a little vague. I'm trying to be as concise as possible. The only way I could explain it properly would be to type out the whole scenario, which I'm sure you busy people have no time for.
I was wondering if there was a way I could use a for each loop? Something along the lines of:
For Each Record in myRecordset
**code to distinguish between two possibilities**
Next
etc.
Thanks for your time everyone,
John