Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct Syntax for changing the recordsource of a subform control?

Status
Not open for further replies.

Jawad77

Programmer
Dec 23, 2004
41
US
I am struggling with finding the correct syntax to change recordsource of a subform control ("SubFormCtl")embedded in my main form ("IOSForm"). The source object for "SubFormCtl" is a form named "SubForm". This is what I am using but it doesn't work:

Forms![IOSForm]![SubFormCtl].Form.RecordSource = "InboundGraphTable"

Where "InboundGraphTable" is the name of the table.

Also I have no clue about the syntax for requering my SubForm.

DoCmd.Requery SubFormCtl didn't work.

Thanks in advance for the help
Jay
 
This should do it:
Me.SubFormCtl.Form.RecordSource = "InboundGraphTable"



I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
It's still not working and driving me nuts :) Do you have any other suggestions to make it work? Thanks for your earlier reply.
 
What exactly is happening that causes you to say it isn't working? Are you getting an error message? If so, what message?
Are records not being displayed, if so, what is your link field?

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Thanks DoubleD. It works now :) Thanks again

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top