|
Posted by Bri on 05/16/05 21:41
Neil wrote:
> (Wait! A brainstorm: the form is initial unbound. (I removed the
> recordsource from the form, since the recordsource is going to be set in the
> Form_Open event anyway. Why have the data be initially loaded only to be
> immediately replaced with new data?) When I specified the main view that I
> use as the recordsource in the form's recordsource property, the form works
> fine when initially loaded, even with only one call to SetRecordSource(). So
> apparently, one setting of the recordsource was necessary to change the form
> from being unbound to bound, and another is necessary to get it to work
> correctly as a bound form. Still doesn't explain *why* that would be the
> case; but at least it's starting to make a little sense.)
It could be that in the unbound state there is something 'waiting' that
times out eventually?
In any case, when I do similar things to this, rather than leave the
form as unbound initially, I set the recordsource to the main
recordsource but with a where clause that forces no records to be
returned (eg WHERE myIdentityField=0). This gives you an empty recordset
that has all the fields in it. This also eliminates the initial form
displaying #NAME# in the controls.
--
Bri
Navigation:
[Reply to this message]
|