473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Calculated field in subform that takes values from main form

Hi,

So this is a two part question.

I have this main form "Manufacturing Production Log" and a sub form "Equipment Downtime Log". Each record on the subform is going under a field in the main form called "Part Number". At least that's what I'm trying to do. The "Part Number" needs to be pulled from the main form and displayed in a corresponding text box on the sub form, anytime a new record is made on the subform. I tried putting this expression as the control source:

=[Forms]![Manufacturing Production Log Form].[Form]![Part Number]

However, it doesn't actually save the record in the subform's table. Anyway I can do this properly?

Second question

I have calculated fields on the subform that need to pull from fields on the main form. I once again tried putting expressions in their control sources but the records don't save in the subform's table.

Here's an example:

Parts Lost to Downtime: =(-[Equipment Downtime (MIN)]/60)*[Goal OPLH] (from main form)*[Headcount Used] (from main form)

This is the expression I put in the field's control source:

Parts Lost to Downtime: =(-[Equipment Downtime (MIN)]/60)*([Forms]![Manufacturing Production Log Form]![Goal OPLH])*([Forms]![Manufacturing Production Log Form]![Headcount Used])

It works but it doesn't save the record onto the table.
How should I go about this?

Disclaimer: I am new to Access and have been watching YouTube videos to get this database working. Please explain like I'm 5.
Jan 3 '22 #1
0 7728

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bill Strass | last post by:
Problem: Access main form/subform as front end to SQL Server backend. Add/edit via subforms work fine. Not so with main form. Set up a master-detail form-subform using two views linked from SQL...
2
by: TDIOwa | last post by:
I have a form (frmAppointment) with a subform on it (frmAppointmentsub1). I have placed a command button on the main form which calls the function below from the module. The purpose of this...
3
by: jquest | last post by:
I have a database about services and installations as well as warranty and services for a company I run. The main form is the customer info form. On this I record names, address and phone numbers....
1
by: john | last post by:
With the help of this NG I got the following to work in a calculated field in a form: =DCount("*";"MyTable1";"MyField1='abc' AND MyField2='J'") I would like to make another calculated field...
2
by: prakashwadhwani | last post by:
I have a (Main) form named : Stocks_Main and a Subform in that named: Stocks_Data The Subform is a continuous form There is a field in the subform called QTY_IN Now ... on the main form i.e....
3
by: wideasleep | last post by:
Hi everyone, I have a subform that is a continuous form. It will have mutiple records that connect to a single record in the main form. I have set this up but running tests show only one record...
0
by: Richnep | last post by:
Hi all,. I have a small issue I would like to resolve with VBA. I have a form which it's fields are bound to a table. Within that form is a subform which is a subtable. Tables relationship...
1
by: ssr61 | last post by:
hi can u help me how to open a sub form with in a main form without opening a new window..... my main form (frm_searchby_Name)consists of text field to enter the address and button when...
2
reginaldmerritt
by: reginaldmerritt | last post by:
Not sure if this is even possible, but i want to select a field in a sub form from a main form. I want to populate a field in the main form with a sub forms field value. eg. me.name =...
0
by: Anton Melamed | last post by:
Hi, I would very much appreciate any help give. Im creating database for handling stock of shoes with different sizes and orders. I have main form - Stock with a subform - Orders Each forms...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.