Search results

  1. N

    VBA code to upload files to SQL Server table BLOB field

    ' https://stackoverflow.com/questions/302258/import-a-files-like-pdf-mp3-doc-xls-into-a-ms-sql-server-datatable-field Private Sub Command0_Click() Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset rs.Open "select * from dbo_TblFiles where [dbo_TblFiles].[ID]=7", CurrentProject.Connection...
  2. N

    The VBA code that check size of file in bytes !

    Private Sub Command0_Click() 'This will return the size of your file in a MsgBox prompt MsgBox "The attachment size is " & Format(FileLen("C:\Users\Documents\Data\myFile.docx") / 1024 / 1024, "0.00 Mb") End Sub
  3. N

    Here is the code that I use to create a shortcut of Access database file in current directory and change the shortcut icon

    Private Sub Command6_Click() Dim ShortcutPath As String Dim FileSname As String FileSname = Left(CurrentProject.Name, InStr(CurrentProject.Name, ".") - 1) ShortcutPath = CurrentProject.Path & "\" & FileSname & " - Shortcut.lnk" With...
  4. N

    To add attachment file to specific record, I use following code but don't know if it is the best way?

    I use this code to attach a QR code picture to current record, is there any further improvement? Private Sub Command4_Click() Dim CoutriesRset, FilteredRset As Recordset Dim SQL As String SQL = "Select * From tblCountries Where Country = '" & Me.Country & "'" ' can use SQL for recordset to...
  5. N

    VBA code to search address on Google Maps

    Application.FollowHyperlink does not work! Private Sub Command5_Click() Dim strDetailAddress As String Dim strGmaps As String On Error GoTo MyError strDetailAddress = Me.CAddresse & " " & Me.Ccity & " " & Me.CodePostal strGmaps = "http://maps.google.com/maps?h1=en&q=" &...
  6. N

    VBA code to check internet connection in Windows OS 64 bit, VBA MS Access 2019

    Sharing code saves time, each year I love more and more MS Access and its VBA, the environment that has more than 30 years of operations, highly stable and highly available, flexible, comprehensible and highly productive in this connected world. In our days, internet connection solves numerous...
  7. N

    Audit Trail, Tracking Changes

    Solution for one who needs with simple code and applying into access database to track for all changes and adding new records or deleting records from main form and subform. If we need to record any change that happens to any record from a main form that links to a subform by one-to-many...
Top Bottom