Re: Combo Box & Report Questions



"ADB_Seeker" <ADB_Seeker@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:1F04738D-EADD-4151-A623-9C8869CD2482@xxxxxxxxxxxxxxxx
Following is my current code:

Private Sub cboSpecEObyAssignee_AfterUpdate()
On Error GoTo Err_cboSpecEObyAssignee_AfterUpdate
Dim stDocName As String
Dim strWhere As String

stDocName = "rptSpecEObyAssignee"
strWhere = Me!cboSpecEObyAssignee

If Me.Dirty Then Me.Dirty = False
DoCmd.OpenReport stDocName, acViewPreview, , strWhere
Me.cboSpecEObyAssignee = Null

Exit_cboSpecEObyAssignee_AfterUpdate:
Exit Sub

Err_cboSpecEObyAssignee_AfterUpdate:
MsgBox Err.Description
Resume Exit_cboSpecEObyAssignee_AfterUpdate

End Sub


That's not right. Instead of this line:

strWhere = Me!cboSpecEObyAssignee

.... you should probably have this, as I posted before:

strWhere = "[ASSIGNEE].[ID]=" & Me!cboSpecEObyAssignee

*And* you should remove the criterion from the report's recordsource query.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

.



Relevant Pages