Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Hi June7,



    I have now successfully made a database of pharmacy, which includes pharmacy tables, forms to fill the data and report format to print the bill. I have added a combo box to autofill the details of a patient and then all the products/drugs are added. then i have created a print button on form which prints a current page record bill. Now i am facing a problem of bills with same ID and patient name does not prints. It shows/prints the previous first one bill with same id and name. the other bills gets a proper bill...
    kindly pls help...!

  2. #17
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17

  3. #18
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The Pharmacy Bill table is not a normalized structure. This limits the number of items for each bill to 27.

    Use the bill number as filter criteria for the report.
    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. #19
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    ya but how can the duplicate printing issue can be solved...!

  5. #20
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    As I said, use the bill number to filter report. Change your code. Try it. What happens?
    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. #21
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Yes ! Thank You Very Much Dear...!

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

    Hi....! Quiet after a long time , i need a help i have created a database to track record the employees daily work on timely basis. now in this i have two fields one "Time of Reporting" & another "Time of Leaving" in which i want to record the current time in "Time of Reporting" and the current time at the time of finishing job in "Time of Leaving".
    Below is The database file link...!

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

  8. #23
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Maybe set DefaultValue for the Time Of Reporting field to Now(). When record is initiated, the field will populate. Maybe use form BeforeUpdate event for code to populate the Time Of Leaving field.

    If IsNull([Time Of Leaving]) Then Me.[Time Of Leaving] = Now()
    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. #24
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Quote Originally Posted by June7 View Post
    Maybe set DefaultValue for the Time Of Reporting field to Now(). When record is initiated, the field will populate. Maybe use form BeforeUpdate event for code to populate the Time Of Leaving field.

    If IsNull([Time Of Leaving]) Then Me.[Time Of Leaving] = Now()



    Dear june7 i tried as u said , first of all Now() in Time of reporting field is working fine and the another in Time of Leaving is not working. Actually the now() code gets execute every time it gets initiated , so time changes every time i open. Can i get a button so that it can populate the current time after clicking on it. i think i can make two buttons for each Time of Reporting & Time of Leaving fields

  10. #25
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The DefaultValue property executes only for new record. If you have Now() in the ControlSource then of course will see different value every time form is opened and the value is not saved into record.

    Can certainly have buttons but then have to rely on user to click them. And then need validation code anyway to make sure the fields are populated before leaving record. And if they forget to click the Time of Reporting button when record is initiated, the data is not correct. Why not automate these inputs?
    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. #26
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    OK Agreed for Automate process ! So please again guide me in details as in what properties what codes to be entered for Time of reporting field and Time of Leaving field and also in what forms or tables...!

  12. #27
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    For TimeOfReporting, set the DefaultValue property of textbox to: Now()

    For TimeOfLeaving, code in the form BeforeUpdate event:

    Me!TimeOfLeaving = Now()
    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. #28
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    dear june7 The TimeofReporting works perfect but the TimeofLeaving does not work. does not executes pls help i entered "Me!TimeOfLeaving = Now()" in BeforeUpdate Event properties but nothing changed.... Please help !

  14. #29
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The code does not go in the property, it goes in VBA procedure.

    Select [Event Procedure] in the event property dropdown, click the ellipsis (...) to open VBA editor, type code.

    Or if you prefer, code an embedded macro with SetValue method. I don't use macros, only VBA.
    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. #30
    prabhakarpeje is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    17
    Quote Originally Posted by June7 View Post
    The code does not go in the property, it goes in VBA procedure.

    Select [Event Procedure] in the event property dropdown, click the ellipsis (...) to open VBA editor, type code.

    Or if you prefer, code an embedded macro with SetValue method. I don't use macros, only VBA.
    Still not working , m uploading a screenshot of the code setting done..

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

Page 2 of 3 FirstFirst 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