Hi all,
I'm trying to test/implement some of the performance suggestions on Tony Toews access peformance faq found here:
One of the suggestions is to load recordSources and control sources at runtime. I've done that, at least in terms of the form and subform of the front tab of my main page. I already had setup something for subforms on the other tabs (they load when the tab is selected). I have NOT taken this faq all the way to the individual combo/listbox control level (yet).
According to the faq, you are then suppose to set the recordSource/control sources in question back to "" in the Form_unload event.
When I do that for the main form's recordSource, the Form_Current event fires immediately and my code breaks at lines such as this one:
If Forms!Files.cmbStatus = 2 Then
'blah blah blah
End If
...telling me "The expression you entered has a field, control, or property name that yourApp can't find"
It sort of make sense, because the recordSource is (I assume) now set to "". But I don't know how to get around this code breaking, and it's not just one line...there's a number of things I've got going on in the Form_Current event that are very similar to what I posted above..
I tried wrapping the Forms!Files.cmbStatus in the above code with Nz, as in Nz(Forms!Files.cmbStatus, 1), but that doesn't seem to do anything (and I really never thought it would).
Any help here??
Thanks,
T
I'm trying to test/implement some of the performance suggestions on Tony Toews access peformance faq found here:
One of the suggestions is to load recordSources and control sources at runtime. I've done that, at least in terms of the form and subform of the front tab of my main page. I already had setup something for subforms on the other tabs (they load when the tab is selected). I have NOT taken this faq all the way to the individual combo/listbox control level (yet).
According to the faq, you are then suppose to set the recordSource/control sources in question back to "" in the Form_unload event.
When I do that for the main form's recordSource, the Form_Current event fires immediately and my code breaks at lines such as this one:
If Forms!Files.cmbStatus = 2 Then
'blah blah blah
End If
...telling me "The expression you entered has a field, control, or property name that yourApp can't find"
It sort of make sense, because the recordSource is (I assume) now set to "". But I don't know how to get around this code breaking, and it's not just one line...there's a number of things I've got going on in the Form_Current event that are very similar to what I posted above..
I tried wrapping the Forms!Files.cmbStatus in the above code with Nz, as in Nz(Forms!Files.cmbStatus, 1), but that doesn't seem to do anything (and I really never thought it would).
Any help here??
Thanks,
T