I have a form that, depending upon a combo box in the header, will change the recordsource of the form to whatever table is listed in the drop down.
I have no problem with that.
Unfortunately, my form has a continuous subform that shows all entries on that table for easy viewing.
I can change the recordsource for my main form- but I can't get the subform recordsource to change.
Here is what I have tried:
'Me!actsubform.Form!RecordSource = "A_" & [Unviewedlist]
Access says :Microsoft Access can’t find the field “actsubform” referred to in your expression
'Forms!actsubform.RecordSource = "A_" & [Unviewedlist]
'Forms("actsubform").RecordSource = "A_" & [Unviewedlist]
'[Forms]![Actsubform]!RecordSource = "A_" & [Unviewedlist]
Access says: Microsoft access can’t find the form ‘Actsubform’ referred to in a macro expression or virtual basic code
I think I must on the right track for the last three, because at least it doesn't call it a 'field' but calls it a "Form"
[Unviewedlist] is the combo box on the main form with the name of the table.
For instance, the combobox says "Jane_C"
The table is really called "A_Jane_C" so I added "A_".
Please tell me it's something obvious about the syntax.
Thank you for all of your help
I have no problem with that.
Unfortunately, my form has a continuous subform that shows all entries on that table for easy viewing.
I can change the recordsource for my main form- but I can't get the subform recordsource to change.
Here is what I have tried:
'Me!actsubform.Form!RecordSource = "A_" & [Unviewedlist]
Access says :Microsoft Access can’t find the field “actsubform” referred to in your expression
'Forms!actsubform.RecordSource = "A_" & [Unviewedlist]
'Forms("actsubform").RecordSource = "A_" & [Unviewedlist]
'[Forms]![Actsubform]!RecordSource = "A_" & [Unviewedlist]
Access says: Microsoft access can’t find the form ‘Actsubform’ referred to in a macro expression or virtual basic code
I think I must on the right track for the last three, because at least it doesn't call it a 'field' but calls it a "Form"
[Unviewedlist] is the combo box on the main form with the name of the table.
For instance, the combobox says "Jane_C"
The table is really called "A_Jane_C" so I added "A_".
Please tell me it's something obvious about the syntax.
Thank you for all of your help