Designing a continuous form for entering score data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #46
    Patient ID (I assume the Combo box. Remember, two columns:

    Row Source:

    Code:
    SELECT tbl_Admissions.AdmissionKey, 
        tbl_Admissions.PatientID 
    FROM tbl_Admissions 
    ORDER BY tbl_Admissions.PatientID;
    Assessment Date is unbound.

    Double check to make sure the Form does note have a record Source.

    Double check the name for the Command Button for Followup.

    Make sure fsubAssessment has that name. make sure it has the proper Record Source (qryAssessments ). Make sure qryAssessments has been updated to reflect your index changes:

    Code:
    SELECT tbl_HoNOS_Assessments.PatientID, 
        tbl_HoNOS_Assessments.AssessmentDate, 
        tbl_HoNOS_Items.ItemKey, tbl_HoNOS_Items.ItemNumber, 
        tbl_HoNOS_Assessments.ItemName, 
        tbl_HoNOS_Assessments.AssessmentRating
    FROM tbl_HoNOS_Items 
        INNER JOIN tbl_HoNOS_Assessments 
            ON tbl_HoNOS_Items.ItemKey = tbl_HoNOS_Assessments.ItemName 
    ORDER BY tbl_HoNOS_Assessments.PatientID, 
        tbl_HoNOS_Assessments.AssessmentDate, 
        tbl_HoNOS_Items.ItemKey;
    Troubleshooting can be frustrating with MS Access, but you must learn to look at everything. When one things changes, it may affect many other things.....

    Comment

    • Hargo
      New Member
      • Sep 2014
      • 88

      #47
      Everything checked so it can only be qryAssessments (NOT sure why it didn't like cmdFollowup - see what happens once everything else sorted)

      Am I right in thinking tbl_Admissions needs to be added so that AdmissionKey can be included as it is the Index

      Would that be the only change?

      Comment

      • Hargo
        New Member
        • Sep 2014
        • 88

        #48
        Made no difference at all so I have attached the code for you to peruse
        Attached Files

        Comment

        • Hargo
          New Member
          • Sep 2014
          • 88

          #49
          Progress slow but steady

          Form now opens Patients can be selected, Dates can be chosen BUT

          Form blank - could this be the second PatientID = 0 ??

          NOTHING happens when either button pressed ....i.e. Zip - no error message no debug request - it's like the code isn't there BUT it is!!


          Here's qry_Assessment results plus the 'blank' form attached


          One question I have - does the query keep growing along with tbl_HoNOS_Asses sments? it'll be huge after a few months of assessments!!
          Attached Files

          Comment

          • twinnyfo
            Recognized Expert Moderator Specialist
            • Nov 2011
            • 3653

            #50
            Why is Admission key = "0000000001 "? that is a text value.

            Send me your Admissions Table in design view.

            Comment

            • Hargo
              New Member
              • Sep 2014
              • 88

              #51
              It's an Autonumber with eight zero formatting

              Comment

              • twinnyfo
                Recognized Expert Moderator Specialist
                • Nov 2011
                • 3653

                #52
                Remove the format and see if that makes a difference. But, it shouldn't make a different if it is a numerical value. And--it shouldn't be part of the query/record source anyway. patient ID is the same value--even though it is displayed as the SG Number.

                Comment

                • Hargo
                  New Member
                  • Sep 2014
                  • 88

                  #53
                  The PatientID = 0 is no longer a problem


                  I removed the Link Master/Child fields entries from the subform and it stopped the Parameter boxes and the message

                  Now it's the buttons doing zip and the blank subform

                  Comment

                  • twinnyfo
                    Recognized Expert Moderator Specialist
                    • Nov 2011
                    • 3653

                    #54
                    Make sure that [Event Procedure] is in the "On Click" events for those buttons.

                    Comment

                    • Hargo
                      New Member
                      • Sep 2014
                      • 88

                      #55
                      Okay :) so now we just have the mystery of the blank subform - button worked but was appending 0(Zero) records due to blank form


                      Can't help thinking it's the PatientID = 0 part again - exactly what happened to the other form when I used = 0 and/or = '' the other day (Friday?)

                      Comment

                      • twinnyfo
                        Recognized Expert Moderator Specialist
                        • Nov 2011
                        • 3653

                        #56
                        Review Post #44. Between lines 27 & 28 and Lines 42 & 43, insert the following statement:

                        Code:
                        Debug.Print strSQL
                        Make sure your immediate window is visible.

                        Open the form, select a patient, click Baseline (append 0 records), click Follow up (Append 0 records).

                        Copy and paste the information from the immediate window.

                        Comment

                        • Hargo
                          New Member
                          • Sep 2014
                          • 88

                          #57
                          I selected Patient and pressed Baseline - back came the Parameter box but with the selected PatientID within it - I tried just pressing ok and adding a date (only parameter i thought could be missing) but the same occurred each time - see attached


                          Soooo close now!!
                          Attached Files

                          Comment

                          • twinnyfo
                            Recognized Expert Moderator Specialist
                            • Nov 2011
                            • 3653

                            #58
                            Send me a screen shot of the properties for your Combo Box for the Patient.

                            Please include also the query used as its row source.

                            Still need the value generated by the Debug.Print.... (from your VBA editor, Ctrl-G to show the Immediate Window)

                            Comment

                            • Hargo
                              New Member
                              • Sep 2014
                              • 88

                              #59
                              Immediate window contents too wide for screen so did a copy and paste and included in attached


                              I'm leaving for the day but will pop on Bytes tonight at home (hopefully I can get the DB open on my laptop!!)

                              Did you get a look at previous thread (Crosstab query once this form works!! haha) ?
                              Attached Files

                              Comment

                              • twinnyfo
                                Recognized Expert Moderator Specialist
                                • Nov 2011
                                • 3653

                                #60
                                Bound column on the Combo box should be column 1, not 2. It is looking for a text value, which the value of the combo box should be a number (The admissions key).... That should do it!

                                Comment

                                Working...