Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    So after March import there would be 3 records. The resulting balance would be 0 and you want all three records deleted?
    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. #17
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Yes it would be deleted off the list.
    The list would only show all new charges and old charges with balance that we are still working on.



    Quote Originally Posted by June7 View Post
    So after March import there would be 3 records. The resulting balance would be 0 and you want all three records deleted?

  3. #18
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Last Status Last Status Date New Status Status Date User
    Called Pt 7/1/2014 Recently Paid 8/1/2014 Betty
    Awaiting Payment Cycle 7/1/2014


    Need a little help on how I should go about the status column.
    Every time a user works on an account they would enter a new status. I would like to be able to build reports and query base on the status.
    Example
    One query would show me all patient that have a Status but with the most current status


    Should I put three columns in the table? Status1 Date Status2 Date Status3 Date
    Or Is there another why of going about this?

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Automating the deletion of records where they aggregate to a 0 balance is an unusual practice but I suppose could be done. I am just not sure how. Perhaps a DELETE sql action. Maybe:

    DELETE FROM tablename WHERE PtID IN (SELECT PtID FROM tablename WHERE Sum(Charges) - Sum(Payments) - Sum(Adjustments) = 0 GROUP BY PtID);


    Multiple status fields is not normalized structure and will cause problems. Maybe:

    SELECT * FROM tablename WHERE StatusDate = DMax("StatusDate","tablename","PtID=" & [PtID]);
    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
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    I don't want to delete any of the records.
    I would like to keep all of the records So if the patient had two status i would be able to see what the first status was and the second and if i build any reports i would be able to show last status.
    How would i going about normalized status column?(still have time to make any corrections)




    SELECT * FROM tablename WHERE StatusDate = DMax("StatusDate","tablename","PtID=" & [PtID]); (this code works great)

    Example
    Status1 Date1 Status2 Date2 Status3 Date3
    Doe John Billed 8/1/2014 Awaiting Payment Cycle 8/12/2014
    Doe Mike Paid 8/15/2014

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    My question in post 16 asked if you wanted to delete records. I thought the answer in post 17 was "yes". Actually, you only meant exclude from query. Try:

    SELECT * FROM tablename WHERE PtID IN (SELECT PtID FROM tablename WHERE Sum(Charges) - Sum(Payments) - Sum(Adjustments) <> 0 GROUP BY PtID);

    Normalized Status would be a record for each status 'event'. But if you feel a non-normalized structure is satisfactory then go for it. Be aware that searching multiple similar fields presents its own complications. Also, number of status actions that can be documented limited by the number of status fields.
    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.

  7. #22
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Normalized status i think would be best.
    So would i have to build a status table? and if so how would i link it to the main table?

  8. #23
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    A status table does sound reasonable but since I don't know your data and business process, I can't be sure what you need. Regardless, I expect these records would need the PtID as foreign key.

    Perhaps a subform on Patients form.
    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. Form designing.
    By glen in forum Forms
    Replies: 29
    Last Post: 11-07-2012, 07:55 AM
  2. Designing Form (Beginner)
    By ccordner in forum Forms
    Replies: 1
    Last Post: 01-17-2012, 12:02 PM
  3. Designing Form
    By Kookai in forum Forms
    Replies: 0
    Last Post: 07-30-2010, 11:03 AM
  4. Aging buckets Access 2003
    By bootster in forum Queries
    Replies: 1
    Last Post: 04-06-2010, 01:11 PM
  5. Aging A/P function
    By nim73 in forum Programming
    Replies: 0
    Last Post: 05-07-2009, 01:23 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