Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17

    A help needed...!

    i have created an access database file in which i want to make pharmacy/medical stores bill , i have created a table called "pharmacy bill" in that i have made many calculated fields and have finally added a gross total field to sum all the fields. i have made a form named "pharmacy bill" the first record in this form is entered and calculated properly but when i add a 2nd record it does not works properly and then the print of first record comes correctly but second record does not get proper page setup arrangement. i have created a report format also but all in vain...!
    I am attaching the link to the file for ur correction and help...

    https://app.box.com/s/ksuc0jd8iy5xuzn6jlu3

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This db is not a normalized relational design. It might seem to meet your requirements but will cause a lot of problems down the road.

    The "Gross Total" for the second form doesn't show anything because you are calculating with some fields that are Null. Calculations with Null result in Null. Calculated fields cannot use functions. So you will have to do the calculation to handle the Null in textbox ControlSource property:

    =Nz([Total 1]) + ... + Nz([Total 22])
    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. #3
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17

    Re: Help Needed...!

    Quote Originally Posted by June7 View Post
    This db is not a normalized relational design. It might seem to meet your requirements but will cause a lot of problems down the road.

    The "Gross Total" for the second form doesn't show anything because you are calculating with some fields that are Null. Calculations with Null result in Null. Calculated fields cannot use functions. So you will have to do the calculation to handle the Null in textbox ControlSource property:

    =Nz([Total 1]) + ... + Nz([Total 22])


    Dear June7 ,
    This is not working. please specify deeply stepwise pls or another options....!

  4. #4
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Please Advice or suggest the options for not having problems future ahead down the road...!

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The best solution is to normalize data structure.

    Why didn't the expression work - what happens? Post what you attempted.
    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. #6
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Actually i did not get the option of textbox control source property .... meand in what ? Form, Table or else where..?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You can do that expression in the report RecordSource sql statement to construct a field and bind textbox to that field or put the expression in textbox 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.

  8. #8
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    sorry but can u pls explain me steps wise pls again sorry

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    http://office.microsoft.com/en-us/ac...001181384.aspx

    Form in Design view.

    Select textbox.

    Type expression in ControlSource property.

    OR

    Form in Design view.

    Select the form if not already by clicking the box in upper left corner.

    Select the RecordSource property.

    Click the ellipses (...) to open the query builder.

    Type expression in a cell of the Field row.
    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.

  10. #10
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Dear June7,

    Thank u very much it finally worked but then i had another problem in printing the bill the grand total would not be shown, so i did as u had advised earlier, then it worked successfully . But still there is one problem , i checked the pharmacy bill table in which the records are saved , in this the record saves all the sub totals and the particulars but it does not show the Grand total here in table datasheet view . pls help or advice....!
    Thanking you...!

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Don't understand. Should not be saving subtotals and grandtotals to a table.
    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.

  12. #12
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Yes its saving all sub totals value but not the grand total...!
    what to do ...?
    means MRP1xQTY1=TOTAL1's value is saved but the Grand total is not been Added...!

  13. #13
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why are you saving these calculated data? There is no reason to, especially aggregate data (Grand Total). These should all be calculated when needed, not saved in table.
    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.

  14. #14
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Dear June7 Thanks for all the previous Kind help given by you..!

    Now i have another need/help required .
    I now actually want to auto deduct the product qty(specified in the pharmacy bill) from the main stock qty list. Means if i prepare a bill of some item(gloves) and qty is 5, this qty should be automatically deducted from the main gloves stock list 50 qty to 45. i have a combo box to select the product name .

  15. #15
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Ideally, balance on hand should be calculated when needed. Adjusting the quantity increases risk for error because it is disconnected from the raw data. Sum of purchases minus sum of sales equals balance on hand. Review http://allenbrowne.com/AppInventory.html
    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 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help Needed
    By nur annie in forum Forms
    Replies: 2
    Last Post: 11-02-2012, 02:56 AM
  2. Help Needed
    By sdecaire in forum Access
    Replies: 2
    Last Post: 11-11-2011, 03:07 PM
  3. Help Needed
    By vkmarty in forum Access
    Replies: 1
    Last Post: 09-23-2011, 07:23 AM
  4. Help needed
    By longbo43 in forum Access
    Replies: 3
    Last Post: 09-27-2010, 10:18 AM
  5. Help needed...
    By Pazz in forum Access
    Replies: 0
    Last Post: 11-02-2009, 06:59 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