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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not(Set Subform Recordsouce)

Status
Not open for further replies.

davidmreid

Programmer
Nov 30, 2001
16
US
I get an error message (2580: The recordsource... does not exist) that the data does not exist (it does) when I try to set a query as the recordsource for a subform in a subform on a main form. Any suggestions? Thx.

'Main form
Set frm = Forms(strFORM)

' Subform1 on Mainform
Set ctl1 = frm(strSUBFORM1)

' Subform2 on Subform1
Set ctl2 = ctl1.Form(strSUBFORM2)

' Error returned on next line.
ctl2.Form.RecordSource = strRECORDSOURCE

 

'Main form
Set frm = Forms(strFORM)

' Subform1 on Mainform
Set ctl1 = frm.controls(strSUBFORM1)

' Subform2 on Subform1
Set ctl2 = ctl1.Form.controls(strSUBFORM2)

' Error returned on next line.
ctl2.Form.RecordSource = strRECORDSOURCE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top