1 Reply Latest reply on Aug 21, 2014 8:20 AM by philmodjunk

    Auto-enter

    EricWang

      Title

      Auto-enter

      Post

           Hi, I'm trying to create a database for Mouse Colony Management. 

           I have one table, "Mouse Records", with fields, "Animal ID, Genotype, DOB, Status" etc. 

           I have another table specifically for "Breeding Records". It's got many fields that are the same as the first table. It has "Animal ID, Genotype, DOB, Status". It also has other fields that I need specifically for breeding dates and genotype crosses. 

           I was wonder how would I automate "add a new record" into the Breeding Records table by using values from the fields in the Mouse Records table? 

           Essentially what I want to do is to be in the Breeding Records layout, click add new record, enter in the "Animal ID" and somehow the database goes to the Mouse Records table. looks for the record that has the same value as the one I just entered in the Breeding sheets "Animal ID" field, takes all the values in fields of that specific record that are the same as the ones in the breeding record, and auto-populate them. 

           This way, every time I add a new Breeding Record, I wouldn't have to retype all the information that's already present in another table. 

        • 1. Re: Auto-enter
          philmodjunk

               What is the purpose of a record in "Breeding Records"? Doesn't it document a breeding event by recording the ID's of one male, one female and the date?

               The Genotype, DOB fields should not be in this table at all. A relationship by Animal ID to Mouse Records can make that data accessible without needing to copy it. Status might or might not also be omitted depending on whether you want to always see the animal's current status or capture the animal's status at the point in time when this breeding event was documented. You can set up an auto-enter field option to copy over the value of status if you want this latter option.

               Your relationships would seem (to me) to be:

               MouseRecords|Male------<BreedingRecords>-----MouseRecords|Female

               MouseRecords|Male::AnimalID = BreedingRecords::AnimalID_Male
               MouseRecords|Female::AnimalID = BreedingRecords::AnimalID_Female

               MouseRecords|Male, and MouseRecords|Female would be two different table occurrences of MouseRecords.  BreedingRecords::AnimalID_Male, and BreedingRecords::AnimalID_Female can be formatted with value lists for selecting the correct records for this breeding pair.

               Once you have selected the Mail and Female parent, you can place fields from MouseRecords|Male, and MouseRecords|Female on a BreedingRecords layout to show data from the selected MouseRecords for these two mice. You can also put a portal to BreedingRecords on a MouseRecords|Male layout and include fields from MouseRecords|Female in the individual portal rows to show information about each breeding event. And you can do the opposite of this on a layout based on MouseRecords|Female.