Results 1 to 7 of 7
  1. #1
    Mike757 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Location
    Newport News, VA
    Posts
    4

    Save Calculated Data

    Hi everyone! I'm new to the forum but have been trying to figure out something similar to this question in https://www.accessforums.net/access/...79/index2.html for several days. I've read through this post and the attached tip but can't figure out the code I need to make a calculated field show up on my table. My database is for technicians at work to log their hourly health checks. I have a field on form "Health Check" called "HC_ID" that I automatically bring over to the next form called "Channel_Scan_Form" with the control source property. I would like the data from this field to copy to the accompanying table called "ChannelScan_Table" from this "Channel_Scan_Form". I have tried to place the code in several different events on the property sheet but haven't had any luck bringing the data over to the table. I'm just starting to play with databases, plan on being here for a while and hopefully contributing in the future. Thanks for any help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,616
    What do you mean by 'next form'? What is HC_ID field? Why are you duplicating the data? Is Channel_Scan_Form bound to ChannelScan_Table?

    If you are trying to copy value from form to a table not associated with the form, that is not what the referenced thread discussed.
    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.

  3. #3
    Mike757 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Location
    Newport News, VA
    Posts
    4
    I have a total of 7 tables and 7 forms to go along with them. So the technician would start at the "Health Check" Form where they enter the office, date, and time of the check. This form also has a auto populated field called HC_ID that I want to follow the user to each of the accompanying forms (Health_Check_Form,Channel_Scan_Form, GUI_Based_Checks_Form, Equipment_Room_Checks_Form, VOD_Form, OTT_Form, and STB_Form). The technician works their way through these forms until their checks are done. The point of trying to copy the "HC_ID" field throughout the forms and tables is to keep track of data for a particular set of health checks (say a health check on 4/25/14 2100hrs). The form and associated table both have the "HC_ID" data being stored on them. "Is Channel_Scan_Form bound to ChannelScan_Table?" Yes I do believe it is. Thanks again!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,616
    Use form/subform arrangement and no code will be needed. The Master/Child Links properties of subform container control will synchronize related records and automatically save the HC_ID value as foreign key in the subforms. If the subforms are large, can use a tab control to organize them by placing each subform on a page of the tab control.
    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.

  5. #5
    Mike757 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Location
    Newport News, VA
    Posts
    4
    That does sound like a good option but I've already spent a large amount of time designing the forms I have now. I did just try to use the wizard to build the form/subform but it gave me an error when it tried to build the form saying something like there are too many fields please reduce the number of fields and try again. Is there no easier way with code on my existing forms? Working on your suggestion now trying to incorporate my existing forms. Thanks for the help I'll post back in a bit!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,616
    I never use the design wizard.

    Drag the Subform/Subreport container control from the design tab onto main form in design view. Set the SourceObject property of the container to one of your existing forms. Set the Master/Child Links properties. Good idea to give the container a meaningful name, like ctrChannelScan. Then get rid of the code.
    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.

  7. #7
    Mike757 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Apr 2014
    Location
    Newport News, VA
    Posts
    4
    Gotcha just finishing up building it now. Next step is to put together some useful queries and reports. Thank you very much for your help!

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

Similar Threads

  1. Replies: 17
    Last Post: 02-15-2014, 01:13 AM
  2. Replies: 5
    Last Post: 02-03-2014, 03:06 AM
  3. Replies: 3
    Last Post: 04-03-2013, 11:29 PM
  4. Replies: 2
    Last Post: 01-09-2012, 08:15 AM
  5. save data calculated, using query or report
    By victor in forum Programming
    Replies: 1
    Last Post: 08-03-2010, 08:49 AM

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