Search results

  1. D

    Missing MsysResources

    Hi After a Microsoft365 upgrade, my databases will not load reports. When I try to compact and repair I get a message that the MsysResources file is missing. I have copied the front end from another computer which is working fine but the error persists on my laptop. Would appreciate any...
  2. D

    Importing from excel column headers in row 5

    Hi all My client has modified their excel spreadsheets so the headers are now in row 5 instead of row 1. How can I modify the following function to reflect the changes? Public Function ImportHierarchyFunctionFiles() Dim MyFile As String Dim MyPath As String Dim db As Database Set db =...
  3. D

    Export to Excel not working correctly

    Hi I have the following code to export separate excel files from a query in my database. The problem is that it is exporting all data from the query to each spreadsheet instead of the data applicable to that countrycode. Can someone please help me with this. Private Sub Command185_Click()...
  4. D

    Solved Creating Excel Files from Access

    Hi I am trying to create 134 Excel Macro Enable workbooks from my Access application. My code is Public Function CreateDataFiles() Dim xlApp As Object Dim xlWB As Object Dim strFileName As String Set xlWB = Workbooks.Add("C:\KPMG\Excel Templates\Member Firm DataFile.xlsm") Dim rs As...
  5. D

    Code not recognising correct fields in a sharepoint list

    Hi all I hope I am posting this in the correct part of the forum. I have an application which I designed thinking the back end was to be deployed to an sql server. I now find they want it on Sharepoint which I have never used before. I have managed to split the back end to a sharepoint site...
  6. D

    Join Expression Not Supported

    Hi I have the following code which exports excel files form a query to a folder on C:\. (with a lot of assistance from the forum!) Private Sub cmdExpoirtMissingDataFiles_Click() Dim rs As Recordset Dim CreationMoment As String: CreationMoment = " Created on " & Format(Date, "ddmmyy") & " at "...
  7. D

    Complex Query

    Hi All This is a bit messy! I have a table with 57 fields which denote responses to a survey. There are 135 companies that provide the data, each with a number of staff who respond culminating in a table with over 250,000 records. Not every company has to supply data for all of the fields...
  8. D

    Solved Format Number Field in Select Statement

    Hi Could someone please show me the correct syntax to format the field [CountryCode] in the following select statement to zero decimal places? SELECT [qryCountriesWithMissingData].[Member Firm], [qryCountriesWithMissingData].[CountryCode], [qryCountriesWithMissingData].[No of Records] FROM...
  9. D

    Solved Nested Loop

    Morning All I have the following code (created with a lot of help from forum users) which loops through a query, creates an Excel file (with formatting) in a directory on C:\ The query examines a fairly large table to identify missing data in 32 fields of the table for 134 different countries...
  10. D

    Solved Formatting Excel File from Access

    Hi all I am trying to run code that formats an excel spreadsheet after it is created in Access. My code is: Private Sub cmdExportMissingDataFiles_Click() On Error GoTo ErrorHandler Dim rs As Recordset: Set rs = CurrentDb.OpenRecordset("SELECT DISTINCT CountryCode, Country FROM...
  11. D

    Count Excel Records from Access

    Hi All Is there a way to count the records in an Excel spreadsheet from within Access? I want to check the number of records before I import them to Access and then run a check that the correct number of records have been appended to the table. Many thanks
  12. D

    Loop through query to send emails with attachments

    Hi I have 134 users from different countries who send in Excel files with data for a survey. Some of the files may not be complete and have missing data. To date, I have managed to: 1. Automate the import of all 134 files into a table. 2. Create a query to identify those files that have...
  13. D

    Solved Lopping through a query to export separate Excel files

    Hi, I have the following code to export a query result to Excel. Dim db As DAO.Database Dim rs As Recordset Set db = CurrentDb Dim mySql As String Dim MYPath As String Dim Country As String mySql = "SELECT * From QryMissingData" Country = DLookup("Country", "tblCountries", "CountryCode = 1")...
  14. D

    Solved Importing Multiple Excel Files

    Hi I need to import over 20 excel files into one table in a new project. I have found the following code to do this: Public Function Impo_allExcel() Dim myfile Dim mypath mypath = "C:\KPMG\Country_Data" ChDir (mypath) myfile = Dir() Do While myfile <> "" If myfile Like "*.xlsx" Then...
  15. D

    Replacing Run time error 3022

    Hi I have an unbound form which adds records to a table with a unique index based on the Month and Year (expmonth and expyear respectively) When I attempt to add a record that violates the index rules, I receive error 3022 which is exactly what it should do. What I am trying to do is replace...
  16. D

    Object Required - Linked Table

    Hi I have a back end on another computer which in the main works fine. I have however one linked table which I cannot update. My function is Public Function AddToGSTAccount() Dim dbsPaymentsDue As Database Set dbsPaymentsDue = CurrentDb Set rstTblPaymentsDue =...
  17. D

    Dcount Multiple Criteria Syntax

    Hi Could someone please help me with this. I have tried so many variations with syntax and just cannot get it right! My stripped down Dcount statement looks like: RecordExists = Dcount("ID","tblStockOut",StockItem = & StockItem & and Quantity = & Quantity & and Date = & ThisDate &) Where all...
  18. D

    Windows 11 Home Date Issues

    Hi I have an Access app which runs perfectly on my laptop, running Windows 11s. I have purchased a Surface Pro 8, running Widows 11 Home. I have copied the front end of my app to the Surface Pro and linked the tables to the Back End on my laptop. I am now getting erratic errors in my app on...
  19. D

    Last Friday in Each Month

    I have googled this and cannot find a solution. Does anyone have a function which returns the date of the last Friday in a month. Appreciate your assistance. Thanks
  20. D

    Calculate DateDiff Between 2 records in same table/query

    Hi All I am trying to calculate the elapsed time between 2 records in the same table. I have a table which records rainfall data per day. Obviously, not all days are recorded. I need to know the number of days between 2 rain records so basically this is the elapsed time between the latest...
Top Bottom