F
Fred Boer
Hello:
Well, I've been giving my debugging muscles a workout (think 98 lb weakling,
sand in the face, no date for the prom...), and I am stumped. I have a form
with a subform. It works perfectly. If I open it from another form, using
OpenArgs, I get an error message. Why?
Thanks!
Fred Boer
Details:
Error #: 2455 "You entered an expression that has an invalid reference to
the property form/report"
The following line calls the form:
DoCmd.OpenForm ("Frm_PatronCirculationInformation"), , , , , acHidden,
"Patron_ID=" & Me.cboPatronFullname
The called form has the following code:
Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Me.OpenArgs) Then
With Me.RecordsetClone
.FindFirst Me.OpenArgs
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
End If
Me.cboBookID.SetFocus
Me.cboBookID = Null
End Sub
Private Sub Form_Current()
Me.RecordsetClone.MoveLast
Me.cmdGoNext.Enabled = Not (Me.CurrentRecord =
Me.RecordsetClone.RecordCount)
Me.cmdGoPrevious.Enabled = Not (Me.CurrentRecord = 1)
'NEXT LINE GENERATES ERROR..........
If
Forms!Frm_BookCirculationInformation!Frm_BookCirculationInformationSubform.Form.RecordsetClone.RecordCount
= 0 Then
Forms!Frm_BookCirculationInformation!Frm_BookCirculationInformationSubform.Visible
= False
Else
Forms!Frm_BookCirculationInformation!Frm_BookCirculationInformationSubform.Visible
= True
End If
End Sub
Well, I've been giving my debugging muscles a workout (think 98 lb weakling,
sand in the face, no date for the prom...), and I am stumped. I have a form
with a subform. It works perfectly. If I open it from another form, using
OpenArgs, I get an error message. Why?
Thanks!
Fred Boer
Details:
Error #: 2455 "You entered an expression that has an invalid reference to
the property form/report"
The following line calls the form:
DoCmd.OpenForm ("Frm_PatronCirculationInformation"), , , , , acHidden,
"Patron_ID=" & Me.cboPatronFullname
The called form has the following code:
Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Me.OpenArgs) Then
With Me.RecordsetClone
.FindFirst Me.OpenArgs
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
End If
Me.cboBookID.SetFocus
Me.cboBookID = Null
End Sub
Private Sub Form_Current()
Me.RecordsetClone.MoveLast
Me.cmdGoNext.Enabled = Not (Me.CurrentRecord =
Me.RecordsetClone.RecordCount)
Me.cmdGoPrevious.Enabled = Not (Me.CurrentRecord = 1)
'NEXT LINE GENERATES ERROR..........
If
Forms!Frm_BookCirculationInformation!Frm_BookCirculationInformationSubform.Form.RecordsetClone.RecordCount
= 0 Then
Forms!Frm_BookCirculationInformation!Frm_BookCirculationInformationSubform.Visible
= False
Else
Forms!Frm_BookCirculationInformation!Frm_BookCirculationInformationSubform.Visible
= True
End If
End Sub