Kodo
"The Shoe"
- Local time
- Yesterday, 22:07
- Joined
- Jan 20, 2004
- Messages
- 707
Ok, I am trying something new here and it works partly. The result is that the forms record source is set and the rows that it displays are the proper count, but no data displays in them. I was working on helping someone else out in the forum when this idea hit me as a good solution, but I can't seem to get it to work 100%. I must be missing some minor detail that I'm not aware of.
Everything seems to work internally. If I do a debug.print on the RS, I do see ALL The proper data that I expect. Any clues?
Thanks!
PHP:
'---------not relevant to my problem-----------
Set objregexp = New RegExp
objregexp.pattern = "\((\W*\w*)\)"
objregexp.Global = True
objregexp.ignorecase = True
Set Matches = objregexp.Execute(myvar)
'---------END IRRELEVANT CODE-----------
'---create disconnected RS---
Dim RS As New ADODB.Recordset
RS.Fields.Append "MyResult", adChar, 50
RS.CursorType = adOpenDynamic
RS.LockType = adLockOptimistic
RS.Open "MyResult"
'--loop through the matches collection and add the value to the recordset
For Each Item In Matches
RS.AddNew
RS("MyResult") = objregexp.Replace(Item, "$1")
RS.Update
Next
'--move it to the first record and set sub forms recordset to RS.
If Not RS.EOF Or RS.BOF Then
RS.MoveFirst
Set Me.Sub11.Form.Recordset = RS
End If
'---clean up objects
RS.Close
Set RS = Nothing
Set Matches = Nothing
Set objregexp = Nothing
Everything seems to work internally. If I do a debug.print on the RS, I do see ALL The proper data that I expect. Any clues?
Thanks!

Last edited: