Search results

  1. Sam Summers

    Solved Cant get past this aggregate function error

    That's it guys! Thank you all SO much
  2. Sam Summers

    Solved Cant get past this aggregate function error

    qryLastKmHours SQL is this: SELECT serviceHistory.machineID, Dmax([KmHours]) AS LastKmHours FROM serviceHistory GROUP BY serviceHistory.machineID; ?
  3. Sam Summers

    Solved Cant get past this aggregate function error

    Hi guys, thank you as always for your help and patience. Now i am getting this error message?
  4. Sam Summers

    Solved Cant get past this aggregate function error

    I'm trying to find out how to add that new query to the current query?
  5. Sam Summers

    Solved Cant get past this aggregate function error

    Hi Arnel once again. Just trying to figure out exactly where to put this: join this to your query (post#1 join with serviceHistory) (on ServiceHistory.KmHours=qryLastKMHrs.LastKmHours)
  6. Sam Summers

    Solved Cant get past this aggregate function error

    Hi everyone, I'm trying to add a field to my continuous form that will show the last record entered for Km or Hours for vehicles. I added the table to my form query so the sequel looks like this: SELECT DISTINCT Machine.MachineID, Machine.ManufacturerRef, Machine.MechanicID, Machine.Type...
  7. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Yes that worked thank you. I will do some final testing over the weekend and let everyone know how I get on. So many thanks to all of you as always
  8. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Incidentally can you see anything wrong with this code: Private Sub OrderValue_AfterUpdate() Dim strTo As String Dim strMessage As String Dim strSubject As String Dim attch As String If Nz(Me.OrderValue, "") = "" Or Nz(Me.SiteID.Value, "") = "" Or Nz(Me.OrderedForID.Value, "") = "" Then...
  9. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Ok, so i found the error. It was in this line: .Offset(0, 6).Value = DLookup("OrderedForName", "tblOrderedFor", "OrderedForID = " & Nz(rs!OrderedForID, 0)) & "" I had " & Nz(rs!OrderedFor, 0)) & "" instead of " & Nz(rs!OrderedForID, 0)) & ""
  10. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Hi Arnel, now i am getting the message "Item not found in this collection" when i select the file "Orders Placed 21-05-21 to 27-05-21.xlsx"
  11. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Hi, not sure what you mean as i have never attempted this before. It was all working fine until i added the option for two different users to select their own excel files and since i have attempted to insert the data into them depending on what document is selected
  12. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Hi Minty, The error is on or just after this line after the import document function: Set oBook = objExcelApp.Workbooks.Open(Me.SelectedFile.Text, , False, , , , True, , , True) After this i get the Macros window appearing And i also get the error message "Object variable or With block...
  13. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Hi Minty and thank you for replying. I am getting the message "Item not found in this collection" Public Function ImportDocument() On Error GoTo ErrProc Dim fd As FileDialog Set fd = Application.FileDialog(msoFileDialogFilePicker) With fd .InitialFileName = ""...
  14. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Just a quick one if anyone is still watching, I have updated my creation on the frmPO from the Save button code with this code to allow two different users to select their particular excel files and using wildcards in the file string i am then attempting to insert the data from the form into...
  15. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Ok, what was happening was Excel (or Access) was still holding something in memory and after i restarted my laptop your code all worked Arnel so many many thanks once again!!!
  16. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    Once again Thank you but for some reason i keep getting the message asking me if i want to replace the file which i don't?
  17. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    And now its asking me if i want to replace the spreadsheet?
  18. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    So here is my DB and the Spreadsheet the problem is from the Create PO form i want to add the data from the fields "PONumber" into the cell PO, "PODate" into the cell "Date order sent", "OrderedBy" into the cell "Person ordering", "OtherField" into the cell "Item & Description", "Quantity" into...
  19. Sam Summers

    Solved Insert data from a form into a new row of an existing excel spreadsheet

    So day 3 and i am no closer to solving this now. I just do not have a clue how to take the data from a few fields from my form and insert them in preferably a new row inserted in row 2 of an existing spreadsheet "C:\Users\Sam Summers\Desktop\Tanera Docs\Database Backups\Logistics System\June...
Back
Top Bottom