I have an item table with one field being UnitCost. I have a JobDetail table with one field being UnitCost. Both tables are linked by ItemCode.
My data capture form shows fields from both tables. What I want is for the JobDetail.UnitCost field to have the Item.UnitCost field as its default value. I have entered [Items]![UnitCost] as the default value in the properties data tab. However this gives a #Name error in the JobDetail.UnitCost field. This is because the Item.UnitCost field is the standard price that may occasionally be changed by a special price in the JobDetail.UnitCost field.
The Control Source for the JobDetail.UnitCost field is UnitCost and this works fine with no default value.
The record source for the form is:
SELECT JobDetails.*, Items.ItemDescription, Items.Detail, Items.Supplier, Items.Units, Items.Width, Items.UnitCost AS Items_UnitCost, JobDetails.ItemCode, JobDetails.Area, JobDetails.Action, JobDetails.Quantity, JobDetails.MarkUp, JobDetails.VAT, JobDetails.Deposit, JobDetails.UnitCost AS JobDetails_UnitCost FROM Items INNER JOIN JobDetails ON Items.[ItemCode] = JobDetails.[ItemCode];
How do I set Job.UnitCost to have a default value of Item.UnitCost
My data capture form shows fields from both tables. What I want is for the JobDetail.UnitCost field to have the Item.UnitCost field as its default value. I have entered [Items]![UnitCost] as the default value in the properties data tab. However this gives a #Name error in the JobDetail.UnitCost field. This is because the Item.UnitCost field is the standard price that may occasionally be changed by a special price in the JobDetail.UnitCost field.
The Control Source for the JobDetail.UnitCost field is UnitCost and this works fine with no default value.
The record source for the form is:
SELECT JobDetails.*, Items.ItemDescription, Items.Detail, Items.Supplier, Items.Units, Items.Width, Items.UnitCost AS Items_UnitCost, JobDetails.ItemCode, JobDetails.Area, JobDetails.Action, JobDetails.Quantity, JobDetails.MarkUp, JobDetails.VAT, JobDetails.Deposit, JobDetails.UnitCost AS JobDetails_UnitCost FROM Items INNER JOIN JobDetails ON Items.[ItemCode] = JobDetails.[ItemCode];
How do I set Job.UnitCost to have a default value of Item.UnitCost