S
SF
Hi,
I have a form with a listbox that listed Contract ID.
I want to construct a strinf criteria for the report that look like
[Ck_ContractID]='FOG-123' OR [Ck_ContractID]='FOG-124' OR
[Ck_ContractID]='FOG-144'
dim gstrReportFilter as string
For Each varItem In Me.cmbContractNumber.ItemsSelected
gstrReportFilter = gstrReportFilter & gstrReportFilter =
"[Ck_ContractID]='" & Me.cmbContractNumber.ItemData(varItem) & "' OR
[Ck_ContractID]='"
Debug.Print gstrReportFilter '= " OR [Ck_ContractID]='"
'DoCmd.OpenReport Me.listReports, acViewPreview, , gstrReportFilter
''StgCriteria
Next varItem
DoCmd.OpenReport Me.listReports, acViewPreview, , gstrReportFilter
SF
I have a form with a listbox that listed Contract ID.
I want to construct a strinf criteria for the report that look like
[Ck_ContractID]='FOG-123' OR [Ck_ContractID]='FOG-124' OR
[Ck_ContractID]='FOG-144'
dim gstrReportFilter as string
For Each varItem In Me.cmbContractNumber.ItemsSelected
gstrReportFilter = gstrReportFilter & gstrReportFilter =
"[Ck_ContractID]='" & Me.cmbContractNumber.ItemData(varItem) & "' OR
[Ck_ContractID]='"
Debug.Print gstrReportFilter '= " OR [Ck_ContractID]='"
'DoCmd.OpenReport Me.listReports, acViewPreview, , gstrReportFilter
''StgCriteria
Next varItem
DoCmd.OpenReport Me.listReports, acViewPreview, , gstrReportFilter
SF