A
Andy
Hi;
Using A2K.
Need to update a price in tblPackagedProducts when the price is changed in
sfrmProducts.
Just finished browsing more than 1500 post subjects. Nothing obvious to me.
Have 4 Tbls feeding 2 Frms.
frmProductCategory, Record Source = tblProductCategory
sfrmProductName, Record Source = tblProductName
sfrmProductName contains ProductName, ProductDescription, ProductCost,
ProductMarkup, ProductSellingPrice.
frmPackagedCategory, Record Source = tblPackagedCategory
sfrmPackagedProductName, Record Source = tblPackagedProductName
sfrmPackagedProductName contains PackagedProductName,
PackagedProductDescription, PackagedProductCost, PackagedProductMarkup,
PackagedProductSellingPrice.
The user enters products individually in frmProductCategory then in
frmPackagedCategory!sfrmPackagedProductName the user can cluster individual
products in a "Package". All this works correctly.
What the AfterUpdate Event in sfrmProductName![ProductCost] needs to do is
that when the user updates the Cost for a product in
frmProductCategory!sfrmProductName the updated Cost needs to be "Copied?"
into tblPackagedProductName![PackagedProductCost]
and same for ProductCost = PackagedProductMarkup & ProductSellingPrice =
PackagedProductSellingPrice.
Using this Code in AfterUpdate:
Dim X As Variant
X = DLookup("[PackagedProductName]", "tblPackagedProductName",
"[PackagedProductName]= '" _
&
Forms![frmProductCategory].Form![sfrmProductName].Form![txtProductName] &
"'")
If Not IsNull(X) Then
Above works correctly.
What doesn't work is this next snippet:
Tables![tblPackagedProductName].Table![PackagedProductCost] =
Me.Forms![frmProductCategory].Form![sfrmProductName].Form![txtProductCost]
Would someone be so kind and tell me what is missing?
Thank You for taking the time to read this Post.
Andy
Using A2K.
Need to update a price in tblPackagedProducts when the price is changed in
sfrmProducts.
Just finished browsing more than 1500 post subjects. Nothing obvious to me.
Have 4 Tbls feeding 2 Frms.
frmProductCategory, Record Source = tblProductCategory
sfrmProductName, Record Source = tblProductName
sfrmProductName contains ProductName, ProductDescription, ProductCost,
ProductMarkup, ProductSellingPrice.
frmPackagedCategory, Record Source = tblPackagedCategory
sfrmPackagedProductName, Record Source = tblPackagedProductName
sfrmPackagedProductName contains PackagedProductName,
PackagedProductDescription, PackagedProductCost, PackagedProductMarkup,
PackagedProductSellingPrice.
The user enters products individually in frmProductCategory then in
frmPackagedCategory!sfrmPackagedProductName the user can cluster individual
products in a "Package". All this works correctly.
What the AfterUpdate Event in sfrmProductName![ProductCost] needs to do is
that when the user updates the Cost for a product in
frmProductCategory!sfrmProductName the updated Cost needs to be "Copied?"
into tblPackagedProductName![PackagedProductCost]
and same for ProductCost = PackagedProductMarkup & ProductSellingPrice =
PackagedProductSellingPrice.
Using this Code in AfterUpdate:
Dim X As Variant
X = DLookup("[PackagedProductName]", "tblPackagedProductName",
"[PackagedProductName]= '" _
&
Forms![frmProductCategory].Form![sfrmProductName].Form![txtProductName] &
"'")
If Not IsNull(X) Then
Above works correctly.
What doesn't work is this next snippet:
Tables![tblPackagedProductName].Table![PackagedProductCost] =
Me.Forms![frmProductCategory].Form![sfrmProductName].Form![txtProductCost]
Would someone be so kind and tell me what is missing?
Thank You for taking the time to read this Post.
Andy