Search results

  1. E

    How to automatically name reports

    For some reason I also can't add Date() to the file name....any thoughts on how to do this?
  2. E

    How to automatically name reports

    Ok I added: &.".pdf" to the file name and everything works. But I am still uncertain why acFormatPDF wasn't sufficient to achieve the desired result. Any idea what I am missing here? Cheers Eric
  3. E

    How to automatically name reports

    Tried this: Dim reportName As String Dim fileName As String Dim criteria As String reportName = "rptMembersLedgerDebitsAndReceiptsTEMP" PathName = "C:\Users\John\OneDrive\Desktop\Wyresdale Ledger accounts November 2022\" fileName = PathName & Me.Surname & "_" &...
  4. E

    How to automatically name reports

    I am no expert hence my confusion. This is what I tried: Dim reportName As String Dim fileName As String Dim criteria As String reportName = "rptMembersLedgerDebitsAndReceiptsTEMP" fileName = "C:\Users\John\OneDrive\Desktop\Wyresdale Ledger accounts November 2022"\"Surname='" & Me.Surname &...
  5. E

    How to automatically name reports

    I understand but this still doesn't add a unique name to the report which is what I am trying to achieve.
  6. E

    How to automatically name reports

    This most lately which doesn't return an error but does not add a name: DoCmd.OutputTo acOutputReport, , , "Surname='" & Me.Surname & "'AND FirstName='" & Me.FirstName & "'"".pdf", False
  7. E

    How to automatically name reports

    Thanks but I am struggling with the syntax for this and keep getting a Compile error.
  8. E

    How to automatically name reports

    I have a command button on a continuous form that opens a report for an individual in my fishing club with the following: Private Sub Command22_Click() DoCmd.OpenReport "rptMembersLedgerDebitsAndReceiptsTEMP", , , "Surname='" & Me.Surname & "'AND FirstName='" & Me.FirstName & "'" End Sub...
  9. E

    Name and export a report using VBA

    Dear All Happy New Year I am trying to find a way to use VBA to name and export a report. I have a continuous form displaying records with a button to generate the report when I need to. I am using the following VBA for the onclick event of the button to open the report: DoCmd.OpenReport...
  10. E

    Passing values from one form to another form based on a parameter query

    The form opens with the vba and I have duplicated the form and query so I can open it from the home form with the user prompt. The values are bracketed in the query to prompt the user, I was just after avoiding duplicating stuff and using vba to bypass the prompt and fill in the values, if you...
  11. E

    Passing values from one form to another form based on a parameter query

    Hi thanks for your reply, yes that works for the scenario above. But the "frmEnterD.....Receipts" is also open-end directly from a button on another form that depends on the parameters in the query to locate the record so I solve one problem but cause another. I know I could just duplicate the...
  12. E

    Passing values from one form to another form based on a parameter query

    "frmEnterD.....Receipts" is based on the parameter query which asks for Surname and FirstName. The continuous form has the fields Surname and FirstName in it but is based on a query not a parameter query. I am trying to open the form based on the parameter query using the values in the...
  13. E

    Passing values from one form to another form based on a parameter query

    Thank you for the suggestion and I see what you mean by the quotes resolving, but I have tried it out and I still get the prompts for the parameter query to enter Surname then FirstName...at a bit of a loss really.
  14. E

    Passing values from one form to another form based on a parameter query

    Dear All I have a main data entry form for my fishing club that is based on a parameter query using two parameters. I have another continuous form that allows me to see at a glance who has paid up and who hasn't. I would like to have a button on the continuous form that uses the two parameters...
  15. E

    Solved Run-time error 2001

    Thanks for the suggestion, done and works a treat. Happy bunny :)
  16. E

    Solved Run-time error 2001

    Dear All I have a form with a series of buttons that when clicked export data to an Excel spreadsheet using VBA like this: Private Sub cmdOpenEnterMembersDebitsAndReceipts_Click() DoCmd.OutputTo acOutputQuery, "qryAccountantSubReceiptsAfterYearEnd", acFormatXLSX...
  17. E

    Solved Getting a currency to display in a form

    And then I had a brainwave, well sort of......, FormatCurrency(Nz(......,0)) sorts the problem out. Doh Thank you for your response though it got me thinking a tad more logically!
Top Bottom