Cybernetic2002
Programmer
In my project there is a subform that needs to have it's RecordSource updated dynamically through code.
When the user changes the record on the main form, I want the subform to be updated to match the mainform. In order to do this I have to change the subform's RecordSource(Could also use the Filter property) each time the Main form changes to a different record.
In my Main Form_OnCurrent it changes the ID# on the subform to match that of the Main form. But when I try to change the RecordSource of the mainform Access comes back with error# 438: Object doesn't support this property or method.
Here is the code I am using to assign the subform's recordsource. As far as I can tell there is no way to set the recordsource in a subform unless it is actually done in that subform's module.
Forms!qBookings.frmqCars.RecordSource = carRecordSource
If anyone could help me with this or has any other ideas that could make this work I would appreciate it greatly. I am getting desperate as this project is starting to become LARGELY overdue. HELP ME PLEASE!!!
Cyb.
When the user changes the record on the main form, I want the subform to be updated to match the mainform. In order to do this I have to change the subform's RecordSource(Could also use the Filter property) each time the Main form changes to a different record.
In my Main Form_OnCurrent it changes the ID# on the subform to match that of the Main form. But when I try to change the RecordSource of the mainform Access comes back with error# 438: Object doesn't support this property or method.
Here is the code I am using to assign the subform's recordsource. As far as I can tell there is no way to set the recordsource in a subform unless it is actually done in that subform's module.
Forms!qBookings.frmqCars.RecordSource = carRecordSource
If anyone could help me with this or has any other ideas that could make this work I would appreciate it greatly. I am getting desperate as this project is starting to become LARGELY overdue. HELP ME PLEASE!!!
Cyb.