D
deb
On the form f001ProjectReview I have a button with the below code.
It works great if the form fClosureApprovalPopUp has an existing record. If
there is no record to match the ProjectID key then I get error 3048, cannot
open anymore databases.
Private Sub btnReqClose_Click()
On Error GoTo Err_btnReqClose_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fClosureApprovalPopUp"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_btnReqClose_Click:
Exit Sub
Err_btnReqClose_Click:
MsgBox Err.Description
Resume Exit_btnReqClose_Click
End Sub
it highlights the code...
If Me.[fClosureApproval].Form.RecordsetClone.RecordCount = 0 Then
in the below
Private Sub Form_Current()
If Me.[fClosureApproval].Form.RecordsetClone.RecordCount = 0 Then
Me.btnReqClose.Visible = True
Else
Me.btnReqClose.Visible = False
End If
Your help is badly needed!!
It works great if the form fClosureApprovalPopUp has an existing record. If
there is no record to match the ProjectID key then I get error 3048, cannot
open anymore databases.
Private Sub btnReqClose_Click()
On Error GoTo Err_btnReqClose_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fClosureApprovalPopUp"
stLinkCriteria = "[ProjectID]=" & Me![ProjectID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_btnReqClose_Click:
Exit Sub
Err_btnReqClose_Click:
MsgBox Err.Description
Resume Exit_btnReqClose_Click
End Sub
it highlights the code...
If Me.[fClosureApproval].Form.RecordsetClone.RecordCount = 0 Then
in the below
Private Sub Form_Current()
If Me.[fClosureApproval].Form.RecordsetClone.RecordCount = 0 Then
Me.btnReqClose.Visible = True
Else
Me.btnReqClose.Visible = False
End If
Your help is badly needed!!