Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 48
  1. #31
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Setting relationships not required for db to work but as you discovered can be helpful to ensure data integrity.

    If Company_info has only one record for the user's company info, then it does not have a relationship with any other data. It cannot be included in a query with multiple tables. It can be included in a query with only one other table. Put two tables in a query without a join clause and every record of each table will join to every record of other table (a cartesian join). There must be a record in Company_info. Use this query as the report's RecordSource:



    SELECT Query1.*, Order_details.*, Products.Description, Products.Prix
    FROM (Products RIGHT JOIN Order_details ON Products.Product_ID = Order_details.Product_ID) RIGHT JOIN Query1 ON Order_details.Order_ID = Query1.Order_ID;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #32
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    Company_info is for the end user to enter data (per exemple he can enter the slogan which will be displayed at the bottom of the bill, that way he could change it at some point in the future if he wants either advertise or just to say have a good day and thank you).

    I took your advice on having a company_info_ID in the order table and set it to 1 by default. So I could make a relationship between those 2 tables using Company_info_ID. Was I wrong ? Because it's showing the data I wanted.

    I tried the query you just posted naming it Query1 and trying to put it as a recordsource for a dummy report I created (not to mess with the one I have right now) and it gave me an error " Circular reference caused by "Query1" "

  3. #33
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Ooops, I edited my post after you read.

    Sorry, I posted the wrong SQL statement.

    SELECT Query1.*, Order_details.*, Products.Description, Products.Prix FROM (Products RIGHT JOIN Order_details ON Products.Product_ID=Order_details.Product_ID) RIGHT JOIN (SELECT Order.*, Company_info.* FROM [Order], Company_info) AS Query1 ON Order_details.Order_ID=Query1.Order_ID;

    But if the default field satisfies, go with that.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #34
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    But that would be a design flaw right ? as in not exactly the proper way to do it.

  5. #35
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    For a purist maybe. I don't follow all the 'rules'. I do what works for me. It is a balancing act between normalization and ease of data entry/output. I have tables with lots of empty cells because the structure works best for my primary reporting requirements.

    Either way, the Company_info table is in a query with tblOrder. The advantage of the default field is can be done in a query with many tables. The cartesian join can be only two tables.

    The alternatives are

    1. a subreport bound to Company_info placed in report header

    2. company info 'hard coded' on report in labels
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #36
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    I'll stick to what I have right now or I'll add a subreport like you just suggested either way I think I might be done with the preliminary version of the DB. Thank you very much for you time / patience / and I'd go as far as compassion lol :P

  7. #37
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    Latest DB version.
    Attached Files Attached Files

  8. #38
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Expressions in the taxable and non-taxable textboxes:

    =Sum(IIf([Taxable],[Quantity]*[Prix],0))

    =Sum(IIf(Not [Taxable],[Quantity]*[Prix],0))

    Expression in the tax textboxes (I have forgotten the tax rates):

    = 0.05 * Text42

    Expression to sum total:

    =Nz([txt_sub_total],0) + Nz([Texte42],0) + Nz([txt_tps],0) + Nz([txt_tvq],0)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #39
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    Really I am lost. That's just about what I have been trying to do and I do not see where the statement is wrong.

    Also I tried uninstalling the french version and installing the english versio with no success I am still getting the syntax error : You omitted an operand or operator, you entered an invalid character or comma, or you entered text without surrounding it in quotation marks.
    Attached Thumbnails Attached Thumbnails Syntax error.jpg  

  10. #40
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Don't know how to fix this at your end. It works perfect on my computer. I did no other edits in your db (except to resize the subform so the payment mode combobox was not on top of it). I simply entered those expressions in the textboxes you already had there.

    Is there another computer you can test this db on?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #41
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    Yes I will try on another computer. You entered it in the Control Source of the textbox right ?

  12. #42
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Correct. Expressions in textboxes ControlSource property.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #43
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    It works on my laptop... I am very confused.

  14. #44
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Sorry, beyond my expertise.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #45
    Symlink is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2013
    Posts
    42
    Anyone has any idea why it would work on my laptop but not on this computer?

Page 3 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. medical billing software
    By sabrina in forum Access
    Replies: 2
    Last Post: 03-09-2017, 05:45 AM
  2. time and billing DB
    By gpnhmiller in forum Access
    Replies: 4
    Last Post: 12-31-2012, 04:27 PM
  3. Please help on creating simple billing db
    By emttrr in forum Access
    Replies: 7
    Last Post: 12-05-2012, 02:12 AM
  4. Medical billing Database Design
    By Ray67 in forum Database Design
    Replies: 5
    Last Post: 08-22-2012, 11:36 AM
  5. Free Billing Application
    By khalodaaa in forum Access
    Replies: 1
    Last Post: 06-23-2007, 05:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums