nhorton79
Registered User.
- Local time
- Tomorrow, 00:57
- Joined
- Aug 17, 2015
- Messages
- 148
Ok. This might have been asked or solved somewhere else but hoping that someone can tell me how to do it or point me in the right direction.
I have some subform (fsubItemInput) on another form (frmItem) which allow me to add multiple Inputs to a quoted Item
The background tables are:
tblItem
ItemName
ItemDescription
tblInput
InputID
InputName
InputCost
tblItemInput
ItemInputID
InputQty
InputCost
InputID_FK
ItemID_FK
There are a couple of other fields but hopefully this level of detail should suffice for my question.
When I add an Input to an Item, I would like the value of [tblInput].[InputCost] to be copied to [tblInputItemInput].[InputCost]
Before you ask, “why duplicate data?”. The reason is that for most costs the amount will stay the same, however I have some generic Inputs that will allow the user to change the cost in the form.
I currently have the control source of the textbox (txtInputCost) on the subform set to [tblInputItemInput].[InputCost] so that the value will be stored in that field, however I cannot get the initial value to show the value of [tblInput].[InputCost].
I have tried setting the default value to [tblInput].[InputCost], but that doesn’t work. I thought about using a DLookup() but can’t seem to get that to work either.
Any help would be greatly appreciated.
P.S. I am using Access 2007 for this.
I have some subform (fsubItemInput) on another form (frmItem) which allow me to add multiple Inputs to a quoted Item
The background tables are:
tblItem
ItemName
ItemDescription
tblInput
InputID
InputName
InputCost
tblItemInput
ItemInputID
InputQty
InputCost
InputID_FK
ItemID_FK
There are a couple of other fields but hopefully this level of detail should suffice for my question.
When I add an Input to an Item, I would like the value of [tblInput].[InputCost] to be copied to [tblInputItemInput].[InputCost]
Before you ask, “why duplicate data?”. The reason is that for most costs the amount will stay the same, however I have some generic Inputs that will allow the user to change the cost in the form.
I currently have the control source of the textbox (txtInputCost) on the subform set to [tblInputItemInput].[InputCost] so that the value will be stored in that field, however I cannot get the initial value to show the value of [tblInput].[InputCost].
I have tried setting the default value to [tblInput].[InputCost], but that doesn’t work. I thought about using a DLookup() but can’t seem to get that to work either.
Any help would be greatly appreciated.
P.S. I am using Access 2007 for this.