I am pretty inexperienced with VBA recordsets, and hope there is a simple fix to my problem. I have a recordset (rstQuestions) and am using a For Each...Next operation to go through the fields (fldQuestions) and pull data from relevant ones. I'm running into a problem though when I try to navigate to the previous field (not record).
Here's what I'm trying to do... I need to find the relevant field in a recordset (done; no problems), move to the next field in that same record, retrieve and store the field's value in a string, then return to the previous field for further processing.
I have tried fldQuestions.Mo vePrevious and fldQuestions.Mo veNext, but those seem reserved for records, not fields. (I get an "Error 438: Object doesn't support this property or method.")
I even experimented with "Next fldQuestions" and "Previous fldQuestions," with equally poor results.
Is what I'm attempting possible? If so, what is the correct syntax?
I know I could get the same data with a DLookup function, but since my code runs through every field of every record, I'm pretty sure that would slow down the procedure significantly.
Any ideas? Thank you in advance for your help.
Here's what I'm trying to do... I need to find the relevant field in a recordset (done; no problems), move to the next field in that same record, retrieve and store the field's value in a string, then return to the previous field for further processing.
I have tried fldQuestions.Mo vePrevious and fldQuestions.Mo veNext, but those seem reserved for records, not fields. (I get an "Error 438: Object doesn't support this property or method.")
I even experimented with "Next fldQuestions" and "Previous fldQuestions," with equally poor results.
Is what I'm attempting possible? If so, what is the correct syntax?
I know I could get the same data with a DLookup function, but since my code runs through every field of every record, I'm pretty sure that would slow down the procedure significantly.
Any ideas? Thank you in advance for your help.
Comment