Changing form recordsource with code in Access 2007

S

Steve S

In an Access 2000 DB I use the following code to change the recordsource for
a subform depending in certain conditions. It has worked for years in A2000
but when I open the DB with Access 2007 the default recordsource is not
overridden. the rest of the DB seems to be working as it did in A2000

Me.Record_Scores_subform.Form.RecordSource = "Indvls for Scores"

Is this a known issue and/or is there a fix?

Any and all help is appreciated.
 
M

Maurice

Steve,

Try setting the forms recordsource to an empty string first. Maybe it's a
requery thing.

So:

Me.Record_Scores_subform.Form.RecordSource = ""
Me.Record_Scores_subform.Form.RecordSource = "Indvls for Scores"

hth
 
S

Steve S

sorry to take so long to reply but I had other issues ti deal with. I tried
your suggestion - no luck. The query 'Indvls for Scores' returns the
expected results when ran by itself.

Any other suggestions??
 

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