469,955 Members | 2,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

Calculated field in subform that takes values from main form


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.
3 Weeks Ago #1
0 7449

Post your reply

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

Similar topics

2 posts views Thread by prakashwadhwani | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.