Search results

  1. RonPaii

    field variables in sql string

    Using Parameters eliminates the need to cleanup the text and the possibility of injection. Public Sub inToDisc(dFamily As String, sFamily As String, nAccno As Double, sStr As String) ' I don't know where oDB is, so I used CurrentDb ' See the new ,Nones in insert and [sStr] as NewNote...
  2. RonPaii

    ODBC-MS Access Connection Call Failed Error 3146

    Add error trapping to your existing code. Private Sub Form_Load() On error goto errHandler ' Your Code that may error Done: exit sub errHandler: Debug.print "(" & err.Number & ") " & err.Description If err.Number = 3146 then ' ODBC error Dim errorItem As DAO.Error For Each...
  3. RonPaii

    ODBC-MS Access Connection Call Failed Error 3146

    3146 is the VBA error code for an ODBC error. These are ODBC error codes and 2 links for code to decipher and report them. ' DBEngine.Errors(0) errors ' http://accessmvp.com/TomVanStiphout/OdbcErrors.htm '...
  4. RonPaii

    Multiple Sub Reports on main report

    Put the 2 subreports into the main with different links.
  5. RonPaii

    Windows 10 End of Life

    Are the OpenSuSE Access FEs using Access BEs on the server or a SQL server? If Access BE's what type of server, Windows or Linux? Does Samba now fully support NTFS and allow login to Active Directory?
  6. RonPaii

    Windows 10 End of Life

    I believe an emulator like Wine would have problems handling Access BE files. Installing a virtual machine on Linux would have the same hardware issue as installing W11 on the base machine, unless you know of a VM that can also emulate the hardware requirements of W11.
  7. RonPaii

    Extract Year From Control On Form

    If you are using this in a query on a date field, DateSerial is a better choice because it returns a variant date instead of a string. DateSerial([Forms]![BankTransactions ]![ComboYear],"1","1")
  8. RonPaii

    Solved Why an overflow?

    change on of the values to long, making the calculation long. ? 4692 * clng(283) 1327836
  9. RonPaii

    VBA class modules & factory design

    There was a discussion of class factories here at class-factories-parameterized-object-initialization based on a RubberDuck example. I found that with VBA all classes with factories require the Pre-declare attribute to be true, causing all these classes to have 1 instance initialized when your...
  10. RonPaii

    How can I read newly received invoice files without having to re-read the old ones?

    The follow RoboCopy line will copy all changed files with XML extension to your output folder and output the log to your output folder. RoboCopy c:\fatture to c:\gest\fatture *.XML /XO /ns /nc /np /njh /njs > c:\gest\fatture\RoboLog.txt RoboLog.txt will look something like the following...
  11. RonPaii

    How can I read newly received invoice files without having to re-read the old ones?

    Storing the Hash of each file will allow quick check of file changes. Exporting and parsing the RoboCopy log output may be quicker then reading each file in the folder. Each new file line starts with "New File" and ends with the file name. Experimenting with log settings can reduce the size of...
  12. RonPaii

    How can I read newly received invoice files without having to re-read the old ones?

    You can eliminate the RoboCopy step by using FSO to search the folder for new files. Quick Google AI function. Sub FindFilesByDate() Dim fso As Object ' FileSystemObject Dim folder As Object ' Folder object Dim file As Object ' File object Dim targetFolder As String Dim...
  13. RonPaii

    How can I read newly received invoice files without having to re-read the old ones?

    This is a RoboCopy command to copy only files with a last access date on or before the given. c:\pai\ c:\pai\robo *.* /njh /njs /minlad:20251013 > robolog.txt The logfile output looks like the following 28 c:\pai\ New File 504...
  14. RonPaii

    How can I read newly received invoice files without having to re-read the old ones?

    In addition to cheekybuddha's steps, add a table to record the filename(s) imported and the hash. You can then query by hash or filename. If you want auditing, add a column to the imported data table for the hash.
  15. RonPaii

    DoCmd.SendObject and CDO

    With Office apps being pushed to the cloud, it not surprising that COM is being removed. Maria Barnes sample Graph code combined with the new Edge control, makes MS Graph Graph usable in Access. I have played with it, the biggest hurdle for my needs is large attachments and adding OneDrive and...
  16. RonPaii

    DoCmd.SendObject and CDO

    Not only Office apps but thousands of other programs that utilize COM with Outlook to send email.
  17. RonPaii

    Class Factories - Parameterized Object Initialisation

    With pre-declare true you test code needs no define. Sub testImplementClass() With cSomething.Create(5, "Quack") Debug.Print .Bar End With End Sub With a single class, interface makes little sense but multiple classes implementing the same interface allow you to some interesting...
  18. RonPaii

    Class Factories - Parameterized Object Initialisation

    I think you missed a step in the tutorial. To add the attribute, you must export the class module to a text file, then open it in a text editor like Notepad, add the attribute text. then import the text file back into your database. The attribute creates an instance of the class when you FE runs...
  19. RonPaii

    Class Factories - Parameterized Object Initialisation

    In cISomethingFactory you define get properties for Bar and Ducky which are not needed, you can comment them out. in cSomething you are retuning the wrong type. 'Private Property Get cISomething_Ducky() As Long Private Property Get cISomething_Ducky() As String cISomething_Ducky = Ducky End...
  20. RonPaii

    Class Factories - Parameterized Object Initialisation

    Since you defined the interface class "cISomething", shouldn't the implementation functions have that name. Private Property Get cISomething_Bar() As Long ISomething_Bar = Bar End Property Private Property Get cISomething_Ducky() As Long ISomething_Ducky = Ducky End Property IMO The...
Back
Top Bottom