Subform Recordsource

J

James Franklin

Hi,

Can anyone tell me if this is a known bug in Access 2003?

I have an unbound main form with an unbound list control and a subform. The
list box has a default value and the subform form has a SQL string as its
recordsource. The listbox AfterUpdate event changes the subform recordsource
string, depending on the listbox value selected.

When I first open my main form after saving my subform, everything is fine.
But if I make a change using the listbox to display different records/fields
in my subform, the new recordset is displayed even after I have closed and
re-opened my main form.

The weird thing is that my subform form settings seem to remain fine. If I
open the subform on its own, I get the correct, original recordset. But if I
open the main form, the subform results are different (there is no code in
the main form which manipulates the subform.)

As always, any help is greatly appreciated!

Cheers,
Jim
 
U

UpRider

Jim, something IS changing the recordsource for the subform. You say
(there is no code in
the main form which manipulates the subform.)
However this is not true; your listbox value on the main form is evaluated
to update the subform's recordsource.
Try setting some breakpoints in your code just before anywhere the
recordsource is updated. Use F8 to single step thru the code and see if you
can find the place where it happens.

HTH, UpRider
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top