Link to home
Start Free TrialLog in
Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScFlag for Zambia

asked on

Reference Subform control within the subform in Ms Access

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!

User generated image

Regards

Chris
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial