Results 1 to 5 of 5
  1. #1
    SergeantMike is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2018
    Posts
    6

    Subform question

    I am collecting 25 measurements, and only 25 measurements on the length of plant shoots. I want to set up a subform that appears to be a spreadsheet (a datasheet) but is pre-populated 1-25 in the first field. Then when I go to the next plot of land to enter that data I get a "fresh set" of 25. Of course these will all be linked to the name of the plot of land contained in the plot table through the key identifier for that plot. Does anybody have an idea on how to do this?



    Mike Sergeant

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    You have a table for the main form and a table for the sub form?
    Need more info
    - what the forms are tied/linked to (or are not)
    - what is to happen if you try to save either the main form record but haven't filled in all of the 25 related records?

    You might want to have a temp table for the 25 records (and maybe another for the main) and populate it with a SELECT query that appends the main record id 25x as well as numbers 1 to 25 in another field. The subform would be based on the temp table, whose records you'd save to the main subform table when ready. When some action commits all of this, you wipe the temp table for the next time.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    SergeantMike is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2018
    Posts
    6
    Quote Originally Posted by Micron View Post
    You have a table for the main form and a table for the sub form?

    Yes, the main form is retrieving data from the table Observation and the table for the subform is RandomMeasure

    Need more info
    - what the forms are tied/linked to (or are not)
    - what is to happen if you try to save either the main form record but haven't filled in all of the 25 related records?

    This is a data entry error and the user will be alerted to this fact. There will always be 25 measurements taken.

    You might want to have a temp table for the 25 records (and maybe another for the main) and populate it with a SELECT query that appends the main record id 25x as well as numbers 1 to 25 in another field. The subform would be based on the temp table, whose records you'd save to the main subform table when ready. When some action commits all of this, you wipe the temp table for the next time.
    Interesting idea. Could use a command button to transfer the data.

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Mike

    So is your Main Form based on Plots of Land ? with the subform recording on a Daily basis a total of 25 measurements every time??

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    I posted elsewhere about using temp table in a discussion about auto numbering. Rather than repeat it all;

    https://www.access-programmers.co.uk...59#post1623859

    In your case, you'd preload it with the plot id 25 times along with numbers from 1 to 25 and go from there.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Subform Question
    By Jaybird114 in forum Forms
    Replies: 2
    Last Post: 07-19-2013, 01:55 PM
  2. SubForm Question
    By cbrsix in forum Forms
    Replies: 2
    Last Post: 04-25-2013, 03:21 PM
  3. Subform question
    By Hello World in forum Forms
    Replies: 4
    Last Post: 09-26-2011, 04:41 AM
  4. Subform question
    By Wayne311 in forum Forms
    Replies: 34
    Last Post: 01-26-2011, 11:42 AM
  5. Subform Question
    By Desverger in forum Forms
    Replies: 1
    Last Post: 08-11-2010, 02:42 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