I'm stumped.
I have a combo-box on a form that lets a user select a database. Once selected, a datasheet contained in a subform is displayed which shows a list of all user groups within that database. Within this datasheet is a subform containing another datasheet, which is used to display users within that group.
The RecordSource must be altered programmatically in both datasheets whenever the user changes the database combo-box. I'm able to alter the recordsource in the Groups datasheet using a subprogram in the groups form, and calling it as follows:
Call Me.Controls.Item("Groups".Form.SetRecordSource(cboDatabaseName.Value)
This works fine. However, when I try to change the recordsource for the user subdatasheet (using a similar procedure in the "Users" form), I receive a message. Here's the call:
Call Me.Controls.Item("Groups".Form.Controls.Item("Users".Form.SetRecordSource(cboDatabaseName.Value)
And here the error, which is only received on a sporadic basis:
"Run-time Error 2455: You entered an expression that has an invalid reference to the property Form/Report".
Any ideas?
Thanks,
Preston
I have a combo-box on a form that lets a user select a database. Once selected, a datasheet contained in a subform is displayed which shows a list of all user groups within that database. Within this datasheet is a subform containing another datasheet, which is used to display users within that group.
The RecordSource must be altered programmatically in both datasheets whenever the user changes the database combo-box. I'm able to alter the recordsource in the Groups datasheet using a subprogram in the groups form, and calling it as follows:
Call Me.Controls.Item("Groups".Form.SetRecordSource(cboDatabaseName.Value)
This works fine. However, when I try to change the recordsource for the user subdatasheet (using a similar procedure in the "Users" form), I receive a message. Here's the call:
Call Me.Controls.Item("Groups".Form.Controls.Item("Users".Form.SetRecordSource(cboDatabaseName.Value)
And here the error, which is only received on a sporadic basis:
"Run-time Error 2455: You entered an expression that has an invalid reference to the property Form/Report".
Any ideas?
Thanks,
Preston