Adelina_RO
Member
- Local time
- Tomorrow, 00:36
- Joined
- Apr 9, 2021
- Messages
- 42
Here is an interesting question.
I have a form with a subform bound to a ADO recordset. I set this like so:
- and it works just fine.
Then, on the parent form, i have a textbox which acts like a search box. For this, on the "AfterUpdate" event, i change the subform's recordset based on the input text, like so:
- and it works just fine.
The problem is that i want to make it change the subform's recordset as the user types in numbers, so i use the "OnChange" event of the textbox to update the subform's recordset using almost the same code:
- this raises the error in the title of this post.
So my question is: can a form's recordset (ADO based, NOT DAO) be changed as the user types whatever he wants?
Thank you
I have a form with a subform bound to a ADO recordset. I set this like so:
Code:
Set Me.Recordset = cMED.Execute("CALL `FisaApt_C1`(0, '" & ADO_Path(CurrentProject.Path & "\PNG\") & "')")
Then, on the parent form, i have a textbox which acts like a search box. For this, on the "AfterUpdate" event, i change the subform's recordset based on the input text, like so:
Code:
Set Rs = cMED.Execute("CALL `FisaApt_CX`('" & T & "', '" & ADO_Path(CurrentProject.Path & "\PNG\") & "')")
If Rs.RecordCount <> 0 Then Set FisaApt_Sub.Form.Recordset = Rs
The problem is that i want to make it change the subform's recordset as the user types in numbers, so i use the "OnChange" event of the textbox to update the subform's recordset using almost the same code:
Code:
Set Rs = cMED.Execute("CALL `FisaApt_CX`('" & T.Text & "', '" & ADO_Path(CurrentProject.Path & "\PNG\") & "')")
If Rs.RecordCount <> 0 Then Set FisaApt_Sub.Form.Recordset = Rs
So my question is: can a form's recordset (ADO based, NOT DAO) be changed as the user types whatever he wants?
Thank you