1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access 2003 help

Discussion in 'Business Applications' started by jenaid, Jun 25, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. jenaid

    jenaid Thread Starter

    Joined:
    Jun 22, 2011
    Messages:
    24
    I've done that and it does update my printed box to ticked, however when the report opens there are no details in it
     
  2. jenaid

    jenaid Thread Starter

    Joined:
    Jun 22, 2011
    Messages:
    24
    I've put your line of command after the open report code rather than close form code and I think this has worked
     
  3. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Sorry, move it to after the
    DoCmd.OpenReport stDocName, acPreview
     
  4. jenaid

    jenaid Thread Starter

    Joined:
    Jun 22, 2011
    Messages:
    24
    Apart from making it a bit more user friendly and a switchboard i'm almost there! Just the numbering system for the invoice - could you help with that bit please
     
  5. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    What format would you like?
     
  6. jenaid

    jenaid Thread Starter

    Joined:
    Jun 22, 2011
    Messages:
    24
    First one to start G001, then G002 and so on
     
  7. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    What table does the Invoice number field go in and what is the name of the field?
    If you want to have a separate Invoice number table you can use a formatted Autonumber field for it.
    The only problem is if you do not complete a record the autonumber will be incremented, leaving gaps in the numbering.
     
  8. jenaid

    jenaid Thread Starter

    Joined:
    Jun 22, 2011
    Messages:
    24
    I didn't realise it would have to go in to a table - I thought i'd read on some forum that it could just be set up within the report. I'll set one up. Probably just call Table Invoice Number and field Inv No. I'd like to try and find best way so there are no gaps if possible.
     
  9. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Well you could just enter it on a form so that it appears on a report, but how would you remember what the last one was.

    OK, let me know the name of the table and field, so do you want to relate what items are associated with the Invoice?

    Do you want the VBA to store the invoice as a Snapshot?
     
  10. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    I will have to go now, I have been on here over 12 hours.
    I will speak to you tomorrow.
     
  11. jenaid

    jenaid Thread Starter

    Joined:
    Jun 22, 2011
    Messages:
    24
    Ok thank you again. If you get chance to send me code for snapshot tomorrow it would be good.
     
  12. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Here is an example of the VBA code to store the Report as a Snapshot document.

    Dim stFileName As String, filedate As String, Invoiceno As String
    filedate = Left([End Date], 2) & Mid([End Date], 4, 2) & Right([End Date], 4)
    stFileName = "C:\Access\Invoices\" & Invoiceno & " " & filedate & ".snp"
    DoCmd.OutputTo acOutputReport, "EAgents Invoice Heading", "Snapshot Format", stFileName

    We will obviously have to fine tune it so that the atFileName uses your Folder location and the correct name for your Invoice number field. We will replace the "EAgents Invoice Heading" with the name of your Report.
     
  13. jenaid

    jenaid Thread Starter

    Joined:
    Jun 22, 2011
    Messages:
    24
    Hi
    Thank you for this code. (I was not able to work on this yesterday). Everything up to and including advice note is working great - just need to sort the invoice. I have copied the query used to produce advice note and called invoice query. This has all details I need for invoice except for the price. When I add on price field it duplicates the price for the no. of orders. eg. if original order had 4 lines on it, but the advice note/invoice is only to include one of these lines, I get this one line duplicated four times with each of the original four prices at the end. I've had this before but can't remember how to sort? Would you be able to help me yet again please.
     
  14. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Can you post a screen print of the Query in Design mode?
     
  15. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1004150