Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    RentalOrders Form has Errors

    In this database there are two things that I cannot understand. The TotalMiles and TotalDays are listed as 0 in the RentalOrders form. I clearly followed your instructions and created them as you suggested as shown:

    =[MileageEnd]-[MileageStart]

    =[EndingDate]-[StartDate]



    They both show zero when in form view yet I know each RHS component has a value other than zero.

    Also, after a couple of initial forms are advanced only then does the Tax Rate of 7.5% show up. It is not on the first form (or the second) for RentalOrders.

    I believe that I put that in only once when in the RentalOrders table, I put in a default value of 7.5%.

    The TotalDays calculation in the RentalOrders form is actually made in the RentalOrders table. Thus just putting TotalDays with RentalOrders table as the Record source and TotalDays as the control source works.

    It does not work in RentalOrders table and form for TotalDays. The TotalDays value is seen in the RentalOrders table data datasheet view, but it does not transfer to the RentalOrders form. I am unsure as to why.


    Thanks again for all of your help.


    R,

    Lou Reed
    Attached Files Attached Files

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,642
    Okay, this is an issue I seem to remember encountering when first migrating to Access 2010.

    Instead of referencing the field names, reference the textbox names:

    =[Text42]-[txtMileageStart]

    =[txtEndDate]-[txtStartDate]
    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.

  3. #18
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    That seems to work. There is one issue, however. On one of the 6 entries the car of rented out and returned on the same day. By the calculation that you have shown that would mean is was rented for zero days, not 1 day which is actually the case.

    I know of no auto rental company that lets a customer have a car for just one day (with the same day as both check out and return) and charges you for 0 days or no charge at all!

    So in some case such the one mentioned above there must be at least one day of rented use. How is does that change the equation; assuming it does change the equation.

    Thanks in advance.

    R,


    Lou Reed
    Last edited by Lou_Reed; 10-08-2015 at 11:03 AM.

  4. #19
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,642
    Then always add 1.

    =[txtEndDate]-[txtStartDate] + 1
    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.

  5. #20
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, you still have my database from yesterday. So why did the tax rate (7.5%) fail to show up on the first two records. It shows up clearly in the remaining 4 records.

    I believe that you would say because in RentalOrders table the 7.5% tax rate only starts showing on the records 3-6. That is true.

    I believe that I entered it only once in the design view of the RentalOrders table and that should have been sufficient. Why it missed the first two records in the RentalOrders forms is my question? It is on the last four records.

    Thanks in advance.


    R,


    Lou Reed

  6. #21
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,642
    You set the DefaultValue property for TaxRate in table. DefaultValue only works for new record entry. If you set this property after records where created, the field will not be populated unless you type in the value.

    BTW, the Categories table is not a fully normalized data structure. But if this is what the tutorial instructed, guess will have to go with it.
    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.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 09-18-2014, 06:41 AM
  2. data base locking up
    By cwitt11 in forum Access
    Replies: 9
    Last Post: 07-21-2014, 01:28 PM
  3. Replies: 1
    Last Post: 07-08-2014, 06:22 AM
  4. Cannot add records to the data base
    By vagelism22678 in forum Access
    Replies: 1
    Last Post: 09-19-2011, 12:45 AM
  5. Sharing a data base
    By Cran29 in forum Security
    Replies: 3
    Last Post: 02-05-2011, 06:45 PM

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