I have a tabbed master form that has a subform on one tab that shows several fields of a list of projects we are working. There are several buttons at the top of the form that reset the data selection so as to show active projects, planning projects, and one to reset to all records. I am using VBA to set the form recordsource to something like "SELECT * FROM tblWOItems WHERE [phase] LIKE 'act*'", or just "SELECT * FROM tblWOItems" to reset to all records.
This used to work fine in Access 2003, but now in 2007, when I hit the button to show the active records, it shows no records, and when I hit the reset button it shows only one record. Funny thing is if I open the subform as a stand-alone form (and modify the VBA code to take out the reference to the master tabbed form frmactionitems), it works fine. There seems to be something about having it as a subform that is making it not work.
forms![frmactionitems]![frmtestlist].form.Recordset = "SELECT * FROM tblWOItems" does NOT work when form frmtestlist is a subform on the main form frmactionitems
forms![frmtestlist].Recordsource = "SELECT * from tblWOItems" DOES work when frmtestlist is a standalone form.
Any ideas? I played with the "Filter on empty master" property of the subform frame even though there are no master/child relationships but that didn't do anything.
Thanks,
This used to work fine in Access 2003, but now in 2007, when I hit the button to show the active records, it shows no records, and when I hit the reset button it shows only one record. Funny thing is if I open the subform as a stand-alone form (and modify the VBA code to take out the reference to the master tabbed form frmactionitems), it works fine. There seems to be something about having it as a subform that is making it not work.
forms![frmactionitems]![frmtestlist].form.Recordset = "SELECT * FROM tblWOItems" does NOT work when form frmtestlist is a subform on the main form frmactionitems
forms![frmtestlist].Recordsource = "SELECT * from tblWOItems" DOES work when frmtestlist is a standalone form.
Any ideas? I played with the "Filter on empty master" property of the subform frame even though there are no master/child relationships but that didn't do anything.
Thanks,