Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.
Private Sub cmdOpenReport_Click() On Error GoTo Err_cmdOpenReport_Click Dim sSF As String Dim strWhere As String Dim ctl As Control Dim varItem As Variant 'make sure a selection has been made If Me.lstCategories.ItemsSelected.Count = 0 Then MsgBox "Must select at least 1 Category" Exit Sub End If 'add selected values to string Set ctl = Me.lstCategories For Each varItem In ctl.ItemsSelected strWhere = strWhere & ctl.ItemData(varItem) & "," Next varItem 'trim trailing comma strWhere = Left(strWhere, Len(strWhere) - 1) ' Square Feet field Select Case Me.cboBigBox Case "Normal Report" sSF = "[SizeSmall]>=0" Case "Less than 5,000 SF" sSF = "[SizeSmall]<5000" Case "5,000 to 10,000 SF" sSF = "[SizeSmall]>=5000 AND [SizeSmall]<10000" Case "10,000 to 20,000 SF" sSF = "[SizeSmall]>=10000 AND [SizeSmall]<20000" Case "20,000 and above" sSF = "[SizeSmall]>=20000" Case Else End Select 'open the report, restricted to the selected items 'If Len(sSF) > 0 Then strFilter = "[CategoryID] " & strWhere & " AND " & sSF DoCmd.OpenReport "FilteredReport", acViewReport, , "tblCategories.CategoryID IN(" & strWhere & ")" Exit_cmdOpenReport_Click: Exit Sub Err_cmdOpenReport_Click: MsgBox Err.Description Resume Exit_cmdOpenReport_Click End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.