Based on previous posts, it does appear that A2003 handles subform controls
differently than earlier versions.
Suggestions:
1. Try a dot instead of a bang, i.e.:
Me.frmQueryArea.Form.RecordSource = strSQL
2. Open the main form in design view.
Right-click the edge of the subform control, and choose Properties.
Double-check the Name property of the subform control.
It may be different than the name of the form that gets loaded into the
control (its SourceObject).
3. Possible corruption
Uncheck the Name AutoCorrect boxes under:
Tools | Options | General.
Then decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
Then compact the database.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<pa********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a main form (form2) that contains a subform (frmQueryArea). The
subform contains the results of a query built by selecting criteria on
the main form and pushing a command button.
Is there any reason why:
Me!frmQueryArea.Form.RecordSource = strSQL
would give me a "Run-time error 2455 You entered an expression that has
an invalid reference to the property RecordSource" when users run the
query using Access 2000, but not in Access 2003?
I can run the query all day long using 2003, but it bombs in 2000.