gunslingor
Registered User.
- Local time
- Today, 09:42
- Joined
- Jan 13, 2009
- Messages
- 50
Okay!~
My main form just has a couple of buttons off to the left and a subform/subreport window filling up the rest of the screen. When you click a button, it changes the subform/report record source (i.e. my main form acks like a shortcut bar or, in html, a frame window). Everything works great except when I try to change the source object to a report object. Here is the code:
Option Compare Database
Private Sub Command0_Click()
Me.Child3.SourceObject = "frm_parse_all"
End Sub
Private Sub Command1_Click()
Me.Child3.SourceObject = "frm_Boxes"
End Sub
Private Sub Command2_Click()
Me.Child3.SourceObject = "frm_Boxes_by_plant"
End Sub
Private Sub Command8_Click()
Me.Child3.SourceObject = "rpt_Complete"
End Sub
Private Sub Form_Load()
Me.Child3.SourceObject = "frm_Boxes"
End Sub
Private Sub Form_Open(Cancel As Integer)
Me.Child3.SourceObject = "frm_Boxes"
End Sub
The error I get is strange:
"Run-time error '3011':
The Microsoft Jet database engine could not find the object '~sq_cMain_Shorts~sq_cChild3'. Make sure the object exists and that you spell its name and path correctly."
My main form ("Me") is called "Main_Shorts" and the single subform/report is called "Child3". But I have no idea how or why the text got parsed as it did in the error message
Any suggestions? Do I have to change the SourceObject of forms and reports differently? And why?
My main form just has a couple of buttons off to the left and a subform/subreport window filling up the rest of the screen. When you click a button, it changes the subform/report record source (i.e. my main form acks like a shortcut bar or, in html, a frame window). Everything works great except when I try to change the source object to a report object. Here is the code:
Option Compare Database
Private Sub Command0_Click()
Me.Child3.SourceObject = "frm_parse_all"
End Sub
Private Sub Command1_Click()
Me.Child3.SourceObject = "frm_Boxes"
End Sub
Private Sub Command2_Click()
Me.Child3.SourceObject = "frm_Boxes_by_plant"
End Sub
Private Sub Command8_Click()
Me.Child3.SourceObject = "rpt_Complete"
End Sub
Private Sub Form_Load()
Me.Child3.SourceObject = "frm_Boxes"
End Sub
Private Sub Form_Open(Cancel As Integer)
Me.Child3.SourceObject = "frm_Boxes"
End Sub
The error I get is strange:
"Run-time error '3011':
The Microsoft Jet database engine could not find the object '~sq_cMain_Shorts~sq_cChild3'. Make sure the object exists and that you spell its name and path correctly."
My main form ("Me") is called "Main_Shorts" and the single subform/report is called "Child3". But I have no idea how or why the text got parsed as it did in the error message
Any suggestions? Do I have to change the SourceObject of forms and reports differently? And why?