Posts

Showing posts with the label ms-access

Save MS ACCESS attachments with python

Save MS ACCESS attachments with python This seemed pretty simple but it wasn't. The goal was to create an offline database with forms so Users could fill data that will later be put into reports. The catch is that this reports have complex formating and pictures so my idea was to pull data from MS ACCESS (can create tables and forms that manage attachments pretty well) and insert it into word templates using doctpl. My problem is that I can't manage to pull the attached pictures in the ACCESS tables. I've tried using win32com.client like this: import win32com.client daoEngine = win32com.client.Dispatch('DAO.DBEngine.120') db = r"C:UsersPDocumentsdb.accdb" daoDB = daoEngine.OpenDatabase(db) query = "SELECT picture FROM Galery WHERE ID=13" daoRS = daoDB.OpenRecordset(query,2) daoRS.Edit() daoRS.Fields["picture"].SaveToFile("C:UsersPCA037Documents\") daoDB.Close() But it returns error: (-2147352567, 'Exception occurred.',...

Ms Access, group by specific date

Ms Access, group by specific date Is it possible to group by specific date in ms access? I would like to create a monthly report which will bring me the expenses/income from my database. However, I want this report to group the results NOT BY YEAR (1/1-31/12) but from 1/9-31/8 (my business year is from September-August). Is it possible to group the results the way I want? To clarify, you're looking to group all income/expense per fiscal year (or business year) where the fiscal year starts on September 1st. Correct? – STLDeveloper Jul 1 at 18:50 Yes, correct. I want to group by fiscal year. – Manolis Efstratiou Jul 2 at 19:51 1 Answer ...

Run time error '5': while using global variables

Run time error '5': while using global variables i declared the global variable in the Module1 and when i was trying to use it in another module it is showing the runtime error '5':invalid procedure call or argument. i was unable to find the problem please provied the solution for this problem Declaring global variable: Function getFilePath() As String getFilePath = FilePath Set FilePath = "C:quadysterR3AgreementDetails" End Function Implementing of globalvariable: Private Sub SendAgreement_Click() If (Not IsNull(Me.RequestFrom) And Not IsNull(Me.RequestReference)) Then Call AttachR3ServiceAgreement(Module1.FilePath, tripObjectFormation, "Agreement") Me.AgreementDate = Now() Else MsgBox "Please provide 'RequestFrom' and 'RequestReference' to proceed." & vbNewLine & vbNewLine & _ "Press Ok to continue.", vbOKOnly, "Alert!!!" End If End Sub this is the calling function Public F...