Reputation: 73
I have a form that has two subforms; AvailablePublicFolderUsersSubform and RelatedSharedMailboxSubform.
For the current record on AvailablePublicFolderUsersSubform, I want to requery form RelatedSharedMailboxSubform based on the value of column PrimarySmtpAddress in AvailablePublicFolderUsersSubform.
When I open the main form, I get the following error within form AvailablePublicFolderUsersSubform:
Any suggestions to make the proper RecordSource change and eliminate the error is much appreciated.
Thanks in advance.
Upvotes: 0
Views: 186
Reputation: 27644
Since your code runs in another subform, AvailablePublicFolderUsersSubform
, you need to "navigate" from there:
which translates to
Me.Parent.RelatedSharedMailboxSubform.Form.RecordSource
Note: after setting .RecordSource
you don't need .Requery
, this is done automatically.
Upvotes: 1