Copy record (History) from one Admission to the other

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swali
    New Member
    • Nov 2009
    • 12

    Copy record (History) from one Admission to the other

    I have a History table which is connected to the Admission table and the Admission table is connected to the Patient Information table. You can have multiple Admissions for one patient. I want to be able to copy the record in the History table to the next admission. Since the History of the Patient doesn't change much from one admission to the other. I want each Admission ID to have a different History ID.
    Hope that makes sense .
    Thank you.
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    Sure, that makes sense. You're going to have to ask a question if we're to help, rather than stating what you want.

    Comment

    • swali
      New Member
      • Nov 2009
      • 12

      #3
      How can I copy records from the history form, because some of the history information stays the same, and show them in the next Admission? But records should not be overwritten. Each record need to have its own HistoyID and AdmissionID.
      Thank you.

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #4
        Do you want to copy records from the history form to another form, or to the same form, or a subform? Or from a table?
        What form are you entering the records on? Is it bound to a table?
        Do you know any VBA?
        Would you like to give us any other information that might make it possible to help you?

        Comment

        • missinglinq
          Recognized Expert Specialist
          • Nov 2006
          • 3533

          #5
          I assume you have an admission date field, as well as admission ID, history ID, and history fields. You must also have a field that uniquely identifies each patient..

          What are the names of each of these fields, and what are the datatype (Text or Number) of the admission and history IDs?

          What is the name of the table holding these fields?

          Welcome to Bytes!

          Linq ;0)>

          Comment

          • swali
            New Member
            • Nov 2009
            • 12

            #6
            First time writing on a forum so didn't know what or how to ask
            I do know some VB
            The frmHistory is a Subform and is linked by an Account_No.
            Account_No is an ID in the frmAdmission, its an Alphanumeric key and has a foreign key from the frmPatientInfo.
            tblPatient: PatientID (Numeric)
            tblAdmission: AdmissionID (Alphanumeric) , PatientID(Forei gnKey)
            tblHistory: HistoryID(AutoN umber) , AdmissionID(For eignKey)
            I have it to where when you click on the History button it opens the History form and is filtered to show only the record related to AdmissionID
            You can have multiple Admission for one Patient
            Ex: A patient comes in and this is their 2nd Admission How can I display the information from the 1st AdmissionHistor y to show up in the 2nd AdmissionHistor y? So the person entering the information can save some time.
            I am using Access 2007
            Thanks again
            Hope I was clear this time
            Please let me know if there is anything else you guys need to know

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32668

              #7
              Are you still requiring help on this Swali?

              Comment

              • swali
                New Member
                • Nov 2009
                • 12

                #8
                Originally posted by NeoPa
                Are you still requiring help on this Swali?
                Thank you for replying to my post
                I did figure out how to copy records from one form to the other by saving it as Public intCopyField As String
                and then on the cmd button click on the first form
                intCopyField = Me.Text0
                and then on the load event on the second form
                Me.Text1 = intCopyField
                if there is a better way please let me know
                Thanks Again
                and Happy New Year!

                Comment

                • swali
                  New Member
                  • Nov 2009
                  • 12

                  #9
                  Actually I started working on a different project and thought that they both had similar issues and just went back to this one and read my old post and realized its not the same.
                  And since it was something that was "desirable" by the user and not "mandatory" I finished the project without it.
                  I would love to implement this feature if you can help me.
                  Please let me know if you need any more information other than what I posted 4 week ago.
                  Thank you.

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32668

                    #10
                    When I get some time (hopefully this evening) I'll read through what you've said again and see if I can make sense of it. If I can I'll see what I can suggest. Otherwise I'll explain what I need you to communicate more clearly and we can proceed from there.

                    Comment

                    • NeoPa
                      Recognized Expert Moderator MVP
                      • Oct 2006
                      • 32668

                      #11
                      As far as transferring data from one form to another goes this can better be accomplished, assuming one form is invoked by the other, by passing the information across in the OpenArgs parameter of the DoCmd.OpenForm procedure call.

                      Comment

                      • swali
                        New Member
                        • Nov 2009
                        • 12

                        #12
                        The frmHistory is not open while the user is creating a new admission for the patient.
                        tblHistory is connected to tblAdmission by AccountNo
                        tblAdmission is connected to tblDemographic with the patient MRN (Medical Record Number)
                        hope this helps
                        and Thanks again.
                        I am going to read about OpenArgs to see what its about.

                        Comment

                        • NeoPa
                          Recognized Expert Moderator MVP
                          • Oct 2006
                          • 32668

                          #13
                          Sorry I didn't get around to reading this last night. I have now, and unfortunately the information is still quite unclear. I suggest you get (and post) a clear picture of the relevant tables with a clear explanation of how they interrelate. If tblDemographic is relevant, then include it. If not, then mentioning it at all only causes confusion. I can understand the link between tblPatient & tblAdmission, but exactly how tblHistory fits in gets less clear every time it is mentioned.

                          Some tips :
                          1. If your talking about the layout and design of the data then describe the tables. Talking about forms in this context just indicates to the reader that you're not concentrating on what you're saying and that it cannot be relied on.
                          2. How you want this to work in the forms becomes relevant when you have already explained the data (table) structure clearly.
                          3. When referring to tables or forms, use their names consistently (and accurately). frmAdmission is clear. The Admissions form is probably the same thing, but lack of consistency in any explanation is just creating extra work for those trying to follow what you are saying.

                          I'm not saying you do all of these things. This is not an accusation. It is simply supposed to be helpful and general guidance so that you can get it right on the first (next) attempt.

                          When posting the meta-data (info about the layout / structure) of the tables, do it in the same way as I use in my example. Click on the Reply button and you will have access to all the codes I've used. PK & FK stand for Primary Key & Foreign Key respectively. Never use TABs in this as the layout gets mucked up. Use spaces and all is fine.
                          Table Name=[tblStudent]
                          Code:
                          [I]Field           Type      IndexInfo[/I]
                          StudentID       AutoNumber    PK
                          Family          String        FK
                          Name            String
                          University      String        FK
                          Mark            Numeric
                          LastAttendance  Date/Time
                          Please feel free to leave out any fields which are not relevant, but obviously include all fields that are involved in linking any of the tables together.

                          Remember, the quality of the answers you get is very much related to the quality of your question. I appreciate you're new to this game, so I hope that this experience will give you a good start in the field.

                          Comment

                          • swali
                            New Member
                            • Nov 2009
                            • 12

                            #14
                            Thank you again NeoPa
                            As I mentioned earlier I am working on a different project and will not have a chance to go back to this database today.
                            Thanks for being patient, I can get a clear question in a couple of days since I need to go back and look at the database to review what I need.
                            Thanks
                            Hope we can solve this!

                            Comment

                            • NeoPa
                              Recognized Expert Moderator MVP
                              • Oct 2006
                              • 32668

                              #15
                              That answer and attitude are perfectly fine. I generally work on the basis of replying to posts so if you don't post for a short while I won't be holding my breath ;) If I were to, I'd have suffocated a long time ago.

                              PS. Let me know how you get on with the OpenArgs parameter and usage. It can be a little fiddly and counter-intuitive, but it does work and, when used properly, can be really useful. We can help further with that if you find you need assistance.

                              Comment

                              Working...