Recent content by REZ

  1. R

    Data Type Mismatch in custom function

    Noted. I will start a new thread next time. I knew it must be something stupid I was doing. The query was filtering for only one type, all the records returned by the query had valid dates. But once I removed all the filters I could see plenty records with null/blanks. I added an NZ function...
  2. R

    Data Type Mismatch in custom function

    I've got the same issue. I've got a custom function which returns a date, but when I use it in a query and try put a date in the criteria, I get data mismatch error. The query works fine without the criteria, and when the query is used as a recordsource for a form I can see it is a date type...
  3. R

    Export a form to excel along with the combo boxes

    Thanks DBguy, I was thinking along those lines. I've never done that before though. Do I have to save the excel spreadsheet as an .xls or could I use the newer.xlsx? Could you give me the code I would use to export to the template?
  4. R

    Export a form to excel along with the combo boxes

    I've created a small database for a small organisation. They don't have a server, only the boss uses the database. Some reports need to be filled in by other, so I created a button to export to excel, and then import it back. Now they are requesting that there be combo boxes on the excel...
  5. R

    Closing Excel from Access VBA

    At least I've learnt something new! I still can't get the excel application to close, but I seem to have a "work around"
  6. R

    Closing Excel from Access VBA

    Thank you, I can't figure out how to do it
  7. R

    Closing Excel from Access VBA

    Dim fullpath As String Dim xl As Excel.Application Dim WB As Excel.Workbook Dim WS As Excel.Worksheet fullpath = DLookup("hyperlinkbase", "tblusers", "id = " & Forms!frmmain!UserName) & "\TodaysPayments.xls" DoCmd.OutputTo acOutputForm, "frmexpenses", acFormatXLS, fullpath On Error GoTo...
  8. R

    Closing Excel from Access VBA

    How do I get it to catch the next errror. I put "Debug.Print Err.Number" at the end so i can see what happened. but its not stopping at the error
  9. R

    Closing Excel from Access VBA

    same thing. sometimes it works and some times it throws error 462 at that line. Excel is still not closing
  10. R

    Closing Excel from Access VBA

    That .range line randomly throws error 462 sometimes. Other times it works fine, i don't know what makes it error Yes I corrected it
  11. R

    Closing Excel from Access VBA

    I tried using .selection instead of with blocks, but that gave me a compile error befor anything even tried to run
  12. R

    Closing Excel from Access VBA

    I want to select the column down to the last row that has data, so that i can offset it and write a formula concatenating 2 cells in the next column
  13. R

    Closing Excel from Access VBA

    WB.close true does not make a difference and GasMan that range thing does seem to work. I can't see anything in that link that will help cheeky, like this? .Range(Range("E1"), .Range("E1").End(xlDown)).Select It doesn't make any difference
  14. R

    Closing Excel from Access VBA

    Thansk to everyones suggestions, here is my code now: Dim fullpath As String Dim xl As Excel.Application Dim WB As Excel.Workbook Dim WS As Excel.Worksheet fullpath = DLookup("hyperlinkbase", "tblusers", "id = " & Forms!frmmain!UserName) & "\TodaysPayments.xls" DoCmd.OutputTo acOutputForm...
  15. R

    Closing Excel from Access VBA

    Doc Man, you're 100% correct - of course. I've been looking at it for so long, I didn't even realise that putting in "on error resume next" would just skip over the problem, and the result is not at all what I need. Though I still don't understand how I've turned off warnings besides that? So...
Back
Top Bottom