SubForm Modify of "RecordSource" on User action on main form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I would like to load in a query in the subform on action from the user. The
on action of the user is not an issue, the modification to the subform for it
to accept a string into the property Record Source is however. The code I
have is as below

[Forms]![frmCards]![frmCardsubform].[RecordSource] = "Query4"
frmCards is main form, frmCardsubform is subform in frmCards

I am using "Query4" for just as test case, will use more complex quires
depedant on operator slection once I get the simple case working.

The error I get is "Object doesen't support this property or method"

Would very much apprciate any hint/input.
Shad
 
shad said:
I would like to load in a query in the subform on action from the user. The
on action of the user is not an issue, the modification to the subform for it
to accept a string into the property Record Source is however. The code I
have is as below

[Forms]![frmCards]![frmCardsubform].[RecordSource] = "Query4"
frmCards is main form, frmCardsubform is subform in frmCards

I am using "Query4" for just as test case, will use more complex quires
depedant on operator slection once I get the simple case working.

The error I get is "Object doesen't support this property or method"


Right. You're trying to set the record source of the
subform control instead of the form it's displaying.

Me.frmCardsubform.FORM.RecordSource = "Query4"
 
Back
Top