Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Private Sub UpdateQueryTable_BySubsystem(myPath, myFile, myViewName, myDefaultDir, myDestination, myDataSheet, myFieldToFilter) On Error GoTo Error_Check Dim mySQL As String Dim myConnection As Variant Dim mySubSystem As String Dim cn As Object Dim rs As Object Dim strFile As String Dim strCon As String Dim strSQL As String Dim s As String Dim i As Integer, j As Integer Dim ws As Worksheet Dim iCols As Integer ' Path to and file name of Access database strFile = myPath & myFile mySubSystem = Range("WBSSelect") ' Set connection string to Access DB myConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFile & ";" ' Late binding, so no reference is needed Set cn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") ' Open connection to Access DB cn.Open myConnection ' Build SQL Statement If Len(myFieldToFilter) > 1 Then mySQL = "SELECT * " & _ "FROM " & myViewName & " " & _ "WHERE " & myFieldToFilter & " LIKE '" & mySubSystem & "*' " Else mySQL = "SELECT * FROM " & myViewName End If Debug.Print mySQL Sheets(myDataSheet).Select Range(myDestination).Select rs.Open mySQL, cn, 3, 3 ' Include Column Headers in record set Set ws = Worksheets(myDataSheet) For iCols = 0 To rs.Fields.count - 1 ws.Cells(1, iCols + 1).Value = rs.Fields(iCols).Name Next ws.Range(ws.Cells(1, 1), _ ws.Cells(1, rs.Fields.count)).Font.Bold = True ws.Range("A2").CopyFromRecordset rs ' Finish rs.Close Set rs = Nothing cn.Close Set cn = Nothing Set ws = Nothing Exit Sub Exit_ErrorCheck: End Error_Check: MsgBox Err.Description Resume Exit_ErrorCheck End Sub
|How to make computed control in subform only update on the current record.||12||52|
|Excel export Active Sheet in one workbook to a new sheet in another||8||23|
|split worksheet into new worksheets based on changing value in Column A (by means of an Excel VBA)||4||26|
|XML Node Counting in MS Access VBA||4||32|