troubleshooting Question

Reference Subform control within the subform in Ms Access

Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScFlag for Zambia asked on
Microsoft AccessSales
2 Comments2 Solutions118 ViewsLast Modified:
Hi people There!

I having problems assigning a bound control within a sub form called sfrmCostofSales subform] see the photo below . I want a control called stdcost to be updated by un bound control called txtperformance which carries special calculation for cost of sales , I tried the VBA code below , but nothing is working:

Private Sub Form_BeforeInsert(Cancel As Integer)
Me.StdCost = Forms![frmCustomerInvoice]![sfrmCostofSales subform].Form![txtPerformance]
End Sub

The parent form is called frmCustomerInvoice , could it be I'm using a wrong event.

Instead of entering calculation of cost of sales per unit manually I want this control called stdCost which is bound to the table to be update by this unbound control within the datasheete subform called sfrmCostofSales subform] which calculate the correct cost of sales

Kindly help!



Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros