Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat. The purpose of this eBook is to educate the reader about ransomware attacks.
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
|Keeping a combo box up to date for other users||5||23|
|Open CSV, modify and save as xls from Access||12||19|
|SQL Error in WHERE Clause||5||38|
|Replace NULL Value in Crosstab query with previous day data||6||28|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
14 Experts available now in Live!