Search results

  1. B

    Data Mismatch Time Format

    I am using the following to give me in working hours the difference between two dates Public Function WorkingHours(datBegin As Date, datEnd As Date) ' Beginning and end of the day Const tmecDayStart As Date = "08:00:00" Const tmecDayEnd As Date = "18:00:00" Dim...
  2. B

    Export Queries to Named Excel Worksheets

    I am trying to export multiple queries into existing worksheets within the same spreadsheet, but instead of the export overwriting within the existing worksheets, it is creating additional worksheets with the same name plus a "1" suffix. I could rename the queries to the worksheet names, but...
  3. B

    Too Many Fields Defined

    I have a function that deletes existing data in tables, imports new data nad then exports queries into the same excel file. I have three different functions that are very similar, two of them run perfectly, the third comes back with an error message "too many fields defined". I have tried to...
  4. B

    Bank Holidays and working Hours

    I am comparing two dates and times and need find out if the difference between the two is more or less than 10 working hours, working day is Monday to Saturday 08:00 to 18:00. I have modified some code that I found on here which does everything that I need it to do, except factor in Public...
  5. B

    MAX for a number of fields

    I have a table with the following detail Est No RBD ARBD NARBD I want to run a query that will give Est No and latest date that appears in any of the three other fields I assume that the MAX function would work, but I am not sure how to input this into the query, all of the references I can...
  6. B

    Set Mypath to the folder that the Database is in

    I will apologise for this request straight away, it should be straight forward, but I can't seem to find the right statement When i am using VBA on Excel i use the following statement to open up a file that is in the same directory as the active file MyPath = ActiveWorkbook.Path...
  7. B

    Saving & Overwriting existing Excel files

    I am using a macro to run and save queries into existing Excel files. I get a prompt for every file, there are nine, asking if I want to overwite the existing file and I am asked to answer yes or know. I have had a look at similar threads around this and tried using Setwarning to off as the...
  8. B

    Joining multiple queries

    I have created a number of queries that all give an output that gives a Region, company and a result (workstack, failed jobs, issued jobs completed work etc) What I am trying to do is to combine these queries to give me one output that shows by region, by company the workstack, failed jobs etc...
Top Bottom