Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2012
    Posts
    70

    Unanswered: How can i make an invoice in Access 2007?

    I am new to databases and access.

    I have managed, with help, to create a relational database for a cleaning company using access 2007. It is nearly complete, I just need to add invoices (as reports) to the database.


    How can I create invoices for particular bookings using reports? Whenever I try to make something al it ends up being is the bookings table in a different format.



    I need to be able to select the bookings a customer has had (for example) in the past month and put into an invoice with price, time etc... can this be done?



    My DB is attached.
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes
    assuming you have defined relationships that enforce referential Integrity
    assuming you have the data

    create a query that pulls together the various values (columns) that you need form the DB. Bear in mind that for reporting you don't need to do the maths as part of the query, but you can if you prefer.

    set a sort order that mkes sense for your invoices

    to print a specific customers invoice you need a mechanism to select that customer and then call the report. you can do that by say using a button on the custoemr form that opens the invoice report and sets a filter for that customer (look at the docmd,openreport macro in the helpfile for details
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2012
    Posts
    70
    So I need a macro to create a specific query whenever requested (e.g. from a button) then create an invoice/report from that query?


    After thinking, I think it would be easier to have a separate invoice for each booking.

    How would multiple services be handled by the query? If you look in any of my Bookings forms, I have to use a sub-form to display the services due to the many-many relationship required. If in a query how would this be displayed (i.e. one booking, multiple services)

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    need to create a macro... no
    if you want to thats fine by me, I don't do macro's (unless I'm really really forced to), I far prefer using VBA

    no you crearte a query (think of a query as a variant on a table (in this instance its a way of merging data from several tables, ina specific sort order))

    having created your query
    create your invoice report as required
    then activate the report with the limited set of records you want procesed. you cna do that by applying a filter to the macro openreport. if you need further guidance look at the help in Access on openreport
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Here's an example of invoking a Report for the Current Record. You'll need a Field, such as the RunID used in the code, to uniquely identify the given Record. The syntax used in this example is correct when this Field is defined as a Number/Autonumber.

    If your identifier should be defined as Text, you'll need to replace

    strWhere = "[RunID]=" & me!RunID

    with

    strWhere = "[RunID]='" & me!RunID & "'"

    Reports: Print only the current record to a report

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •