Dynamic recordsource on a subform

Mod

DoCmd.PostForHelp
Local time
Yesterday, 22:09
Joined
May 4, 2004
Messages
70
I'd like to make the record source of a subform be dependant on the current record of the main form, any advice? Something like:

SELECT * FROM tblChild WHERE tblChild.parentFK = ParentForm.CurrentRecord.PrimaryKey

but i don't know the correct syntax, or even if form objects can be referred to in queries!
 
Because i didn't see those :(

Now that i've looked at them, i don't see how to use them. What does access expect to see?

I clicked the Build button, but it returned an error about "the expression you entered refers to an object that is closed or doesn't exist."

Can you give me a quick example of the synatx to use in these fields?
 
nevermind, i got it thanks!
 

Users who are viewing this thread

Back
Top Bottom