I have following troubles. I did made an access database that worked with macros just fine so far, but I kinda mixed vba with macros and sometimes that makes it hard to combine. So I started writing the macros into vbas. For the most part that wasn't much of a problem, but following function just won't work for me.
I've got a listbox in my mainform and by screen.activecontrol it used to give a selcted value to a subform (macro: GotoRecordset). Then the recordset was requeried also by a macro. I tried different solutions so far I will only write a few down. Most of them didn't give me an error but they won't work neither. The shown recordset of the subform stays with the first record and won't change.
Expand|Select|Wrap|Line Numbers
- Dim sub3 As Form
- Set sub3 = Forms!mainform!subform.Form
- sub3.Visible = True
- sub3.RecordsetClone.FindFirst "[GSVB] = " & Me!List126
- sub3.Refresh
- sub3.Requery
Expand|Select|Wrap|Line Numbers
- Forms!mainform!subform.Form.Visible = True
- Forms!mainform!subform.Form.Recordset.FindFirst "[GSVB] = " & Me!List126
- Forms!mainform!subform.Form.Requery
Expand|Select|Wrap|Line Numbers
- Me!subform.Visible = True
- Me!subform.Recordset.FindFirst "[GSVB] = " & Nz(Screen.ActiveControl, 0)
- Me!subform.Form.Requery
I have no idea what's wrong here, since there are no errors either. Still they won't change my subform.