Search results

  1. N

    Solved Saving separate reports to PDF using VBA

    That's interesting, but I'm sure mine are in numerical order, even though it's set as text. But I'll double check though when I'm back on my computer. Anyway, I might as well set it to number format though.
  2. N

    Solved Saving separate reports to PDF using VBA

    Hi Gasman, Sorry for my slow reply, I just got back home now. What I've done is attached a practice copy version of my database (just containing a small sample of the invoice and supplier table data). Is that more helpful? By the way, if you wanted to play around with it, feel free to change...
  3. N

    Solved Saving separate reports to PDF using VBA

    Thanks Gasman. I can't remember exactly why I originally decided to put the invoice numbers in as text, but it was probably in case I wanted to insert, say, 1087.5 for example, but I didn't want the other invoices showing as 1087.0, if that makes sense. But probably I won't have any reason to...
  4. N

    Solved Saving separate reports to PDF using VBA

    Ok, I feel like I'm making a little progress. My invoice numbers run from 1064 to 1088. As an experiment I changed the above line of code to... DoCmd.OpenReport "R_Invoices_PDF", acViewPreview, , "Invoice_Number" = "1087", acHidden What happens now is it loops from 1064, 1065 etc (I stopped it...
  5. N

    Solved Saving separate reports to PDF using VBA

    Many thanks, I'll have a look in a second.
  6. N

    Solved Saving separate reports to PDF using VBA

    Exactly, invoice number is text! I'll give your suggestion a go now, and I'll let you know how I get on. I forgot about the intermediate window. I'll try that too. Thanks for your help. Edit. I changed that line of code to... DoCmd.OpenReport "R_Invoices_PDF", acViewPreview, ...
  7. N

    Solved Saving separate reports to PDF using VBA

    I've tested it with F8 a few times. It goes to error with this line. DoCmd.OpenReport "R_Invoices_PDF", acViewPreview, , "[Invoice_Number]=" & ![Invoice_Number], acHidden Error description: Data type mismatch in criteria expression.
  8. N

    Solved Saving separate reports to PDF using VBA

    Hi, I have a report, which is linked to data in a query. The query is a list of invoices, and the first field is the unique invoice number. If I filter the query by invoice number, and save it, when I open the report, it shows just that one invoice, so I am able to save it as a PDF manually...
  9. N

    error trying to reference Access from Excel

    Thanks Isaac, that's good to know. In that case, do you know how I acquire the DLL? Many thanks.
  10. N

    error trying to reference Access from Excel

    Sorry, I only just checked the link you sent me before. I think this is the problem actually, I have a 32 bit office. That must be why it's not working for me. I guess I need to install something else to make it work? I should probably upgrade my Office. Does anyone have a link to a reliable...
  11. N

    error trying to reference Access from Excel

    I see. This is going to take a while to get my head around! I'll have another go tomorrow. Many thanks for help today.
  12. N

    error trying to reference Access from Excel

    I'm running it by pressing the play button on the top of the code window. Normally I might press F8 to go through it in steps, but it's not letting me do that this time. I'm not sure how to screenshot. Also, it's not an error message as such. It's just asking me which macro to select from...
  13. N

    error trying to reference Access from Excel

    Ok, so I've tried to run it. A Macros box pops up, asking me for the macro name from the list of VBA programmes. Is that supposed to happen?
  14. N

    error trying to reference Access from Excel

    Many thanks Isaac, I'll give that a go and let you know how I get on. That's correct, it's a one to one match. Each code represents a different musician. That other method you mentioned is effectively what I'm doing now, except that I'm manually exporting the data from Access to Excel...
  15. N

    error trying to reference Access from Excel

    Well, on my spreadsheet, I will enter some musicians codes in the second column. Based on these codes, I will get the corresponding musicians details from Access, and enter them onto the spreadsheet. All the details can be found in just one table in Access. At the moment I reference another...
  16. N

    error trying to reference Access from Excel

    I now get Run-time error '-2147217865 (80040e37)': Automation error But I changed one line to query = "SELECT * from T_MusicianDetails;", as T_MusicianDetails is the name of one of the tables in my database.
  17. N

    error trying to reference Access from Excel

    How do I check if it came in 64 bits?
  18. N

    error trying to reference Access from Excel

    I spotted my error now, I had left a space before the name of the file! The code has now gone as far as rec.Open query, conn. This gives an error, but I'm guessing this is because it's referring to a customer field, and I don't have any customer fields in my database? Thanks very much for your...
Back
Top Bottom