D
depawl
In this instance I'm trying to have the user select an Organization Code
from a combo box in a form and then click on a command button to print a
report of details for the selected orgcode from the combo box. It seemed
like it was working for a while but now it is stuck on one record, no
matter what the user selects. Also, it frequently gives the following
error: "Update or CancelUpdate without AddNew or Edit"
The code I have is:
Private Sub OrgCodecombo_AfterUpdate()
Me.RecordsetClone.Findfirst "[ORGCODE] = '" & Me![OrgCodecombo] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Private Sub CommandOrgCode_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "OrgCodeReport"
strWhere = "[ORGCODE] = '" & Me![OrgCodecbo] & "'"
DoCmd.OpenReport strDocName, acPreview, , strWhere
Exit_CommandOrgCode_Click:
Exit Sub
End Sub
Seems like maybe I need a requery or something but I can't seem to get it.
Thanks.
from a combo box in a form and then click on a command button to print a
report of details for the selected orgcode from the combo box. It seemed
like it was working for a while but now it is stuck on one record, no
matter what the user selects. Also, it frequently gives the following
error: "Update or CancelUpdate without AddNew or Edit"
The code I have is:
Private Sub OrgCodecombo_AfterUpdate()
Me.RecordsetClone.Findfirst "[ORGCODE] = '" & Me![OrgCodecombo] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Private Sub CommandOrgCode_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "OrgCodeReport"
strWhere = "[ORGCODE] = '" & Me![OrgCodecbo] & "'"
DoCmd.OpenReport strDocName, acPreview, , strWhere
Exit_CommandOrgCode_Click:
Exit Sub
End Sub
Seems like maybe I need a requery or something but I can't seem to get it.
Thanks.