Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 34
  1. #16
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    For that, in the AfterUpdate event of the patient name dropdownbox, you would put a line each to clear/set the default values of both the CPT and Dx cbo boxes.

  2. #17
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    I couldn't get the CPT to advance to the next record using the AfterUpdate Event of the cboCPT. What I had to do is modify a cmdAddRecord Click Event:

    Private Sub cmdAddRecord_Click()
    On Error GoTo Err_cmdAddRecord_Click
    Const cQuote = """"
    Me!CPT.DefaultValue = cQuote & Me!CPT.Value & cQuote
    DoCmd.GoToRecord , , acNewRec

    Exit_cmdAddRecord_Click:
    Exit Sub
    Err_cmdAddRecord_Click:
    MsgBox Err.Description
    Resume Exit_cmdAddRecord_Click

    End Sub

    For the cboPatient, I already have an AfterUpdate Event that displays all subforms when form is opened and name is slected.

    I'm not sure if this can be modified to add your suggestion below to clear the cboCPT when the next name is selected, I won't need the cboDx, it clears when the cmdAddRecord Click Event above is selected.

    Private Sub cboPatients_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object
    Set rs = Me.Recordset.Clone
    rs.FindFirst "[PATID] = '" & Me![cboPatients] & "'"
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark

    Me.sfmEncounter.Visible = True
    Me.sfmPatient.Visible = True

    End Sub


    Quote Originally Posted by Dal Jeanis View Post
    For that, in the AfterUpdate event of the patient name dropdownbox, you would put a line each to clear/set the default values of both the CPT and Dx cbo boxes.

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    I am confused. Why does cboCPT need to be 'cleared'?
    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
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Quote Originally Posted by June7 View Post
    I am confused. Why does cboCPT need to be 'cleared'?
    because when I pick a new patient from the cbopatient (will be converted to a list box), the cpt is still visible from the last record, so when the doctor selects a new patient from the list, the CPT should automatically clear.

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Still confused.

    cboPatient is an unbound combobox used to enter filter criteria to find existing patient record? I don't think listboxes are good for very long lists, doesn't have AutoExpand property.

    cboCPT is a bound combobox used to select patient for a record?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    DB contains confidential patient information, would be a HIPPA violation to post, but I appreciate the offer to review.

    Here's what I've got. A system generated billing report is used to create a qry for the cbopatient, a qry for subform to display the details of the patient selected from the cbopatient. The second subform with a record source to a master table . . . all subforms are child to parent relationship with PatID.

    The cboCPT does not select any patient record, it simply is used as a "data entry" point that gets added to the master tbl to the related patient. The doctor does not need to complete anything else on the form . . . it is all populated for him through the cbopatient and first subform. The only thing missing is the CPT and Dx that takes place during the actual OV. The best way to explain it is . . . the doctor needs to see the demographics of the patient, I couldn't just create a data entry form for the CPT and Dx, so the form gives him a complete picture plus allows for the data entry segment. The cboCPT does not select anything, it simply adds the CPT to the patient record in the master table.

    The cbopatient will be changed to a listbox at the doctors request and will show only patient's scheduled for the current day.

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    I still don't understand why a data entry control (cboCPT) needs to be 'cleared'. Sorry, can't help if I can't understand. Often seeing brings understanding.

    You could make copy and remove/replace confidential info (names, phone numbers, addresses, email, SSN). Even analyzing db with no data at all might resolve this, although dummy records can be helpful.
    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. #23
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    no, that's ok. I just need to know how to clear the cbo box.

  9. #24
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Can't help, don't understand the requirement. Why should a data entry control need to be 'cleared'?
    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. #25
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    buckwheat - Okay, I see where the confusion is coming from. June7 and I have only a vague idea (if that) of how you've designed the screen to function, so our advice is not meeting the actual situation at your end.

    I need to back up and verify the desired functionality. As I understand it, the desired functionality is this:

    First, the doctor selects a patient, and the CPT and Dx start out clear for each new patient.

    *** Does this selection caus a display of existing patient records, or is this solely a data entry screen?

    Next, the Doctor selects a CPT. When a CPT is selected,
    A) the CPT default value is set to that CPT
    B) the Dx combobox is populated with any Dx's relevant to the CPT

    Next, the doctor selects a Dx.

    *** Next, something happens to create a record? Or does the selection of a Dx value create a new record automatically?

    And, lastly, it also might help if you posted a screenshot of the form (with patient = Mickey Mouse or something).

  11. #26
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Hi,

    Yes, everything you said is exactly correct with the exception of your last comment "***Next," The record is already created, the form is used simply to retrieve the data for selected record and add the CPT and Dx codes to that record.

    I think I'm ok here for the time being. Since I put the default value to the cmdbutton and not cboCPT to enter next Dx and carry CPT forward, I will simply create 2 buttons that do not have the default value to carry the CPT . . . one titled "enter new CPT" when they need to change, and the other "done" when they want to select a new patient from the master cboPatient list. Both buttons will do the same function, but this will categorize it for greater ease for the doctor, so he does not forget to clear the CPT when selecting new patient, it will think it is a requirement to select "done".

  12. #27
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    That might have cleared something up for me. You don't want the CPT to have a default value when creating a new record for a patient? What does CPT mean? What is this record you are creating? So maybe in the BeforeUpdate event of cboPatient, set the cboCPT DefaultValue to null, as Dal suggested in earlier post.

    If you want to provide db for analysis, follow instruction at bottom of my post.
    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
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Your interface sounds a little nonstandard, but maybe workable. Do I have this right?

    1) From a blank form, the doctor selects a patient, the CPT and Dx start out clear for each new patient, and a new patient-CPT-Dx record is created.

    2) The doctor selects a CPT, which updates that new record with the chosen CPT, sets the chosen value as default for the CPT, and populates the Dx box with an appropriate list.

    3) The doctor selects a Dx, which updates the new record with the Dx.

    4A) The doctor clicks the "Next" button, prior record is already saved, the button creates a new record, with the default CPT. Go to #3.
    or
    4B) The Doctor clicks the "Done" button, prior record is already saved, the button clears the CPT and Dx boxes and returns the form to blank. go to #1.

    If I have that right, you have two possible special cases.

    A) If the doctor realizes she should have pressed Done but she had pressed Next, then you have half a patient-CPT-Dx record. So your Done box should have code to identify if your latest new record is unfinished, so it can be deleted.

    B) If the doctor doesn't press "done", but just goes up and selects a new patient, the "Done" functionality as above should fire before the patient functionality from the combobox fires.

    If you implement code to handle those two cases, I think you can eliminate the Done button completely, or just call it "clear form" since choosing a new patient will automatically cause the right functionality to occur.

  14. #29
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    This is what I've been trying to accomplish through the threads when asking how to clear the CPT when a new patient is selected through the cboPatient. Should the doctor inadvertently hit the wrong button for a CPT or Dx, I have back and forward arrows to advance through the patients records, when the record containing the error is found, I have a delete record button in place as well.

    As far a standard, whose to say what is standard and what is not , as long as code and results are correct.

  15. #30
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    I chose the word "standard" because it means "what most people do". Much of the confusion in the advice given on this thread was because your interface design was not what most people do, thus leading to your unique challenges.

    "Non-standard" isn't necessarily "error" or "bad", but it does mean that you lose the uninspected wisdom of crowds. Frank Lloyd Wright made some really cool buildings, but a number of them were completely unusable due to his not having fully reconsidered aspects of function that were provided "automatically" by existing designs, provided by architectural aspects that Wright considered redundant or obsolete. Some of the problem Wright buildings did survive long enough for technology (for instance, solar reflective/adaptive screening for windows in huge open spaces) to evolve enough to correct the design deficiency. Others didn't.

    If no record should exist without a valid Dx, you might want to delete them automagically. You may also want to look at putting code in all the navigation buttons, testing Me.Dirty for the current record, and handling any problems before allowing navigation away from an incomplete record.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-09-2013, 10:39 AM
  2. Advancing Date with a command button
    By rmd62163 in forum Access
    Replies: 10
    Last Post: 01-29-2013, 05:02 PM
  3. Replies: 2
    Last Post: 12-21-2012, 01:57 PM
  4. Replies: 3
    Last Post: 08-26-2012, 10:04 PM
  5. Within form, advancing to next record
    By crowegreg in forum Forms
    Replies: 2
    Last Post: 08-07-2011, 09:18 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