I have a main form named "Assign" and two subs one is "Payment" and the 2nd sub is "Income"
the main form is linked to first sub with control "ProjectdetailsID" and the 2nd subform (Income) is linked to main form with control name "AssignID" ...
- 1st subform has controls " ProjectdetailsID" , "ItemPrice" , "paidItem, "PaidID"
- 2nd subform has controls "AssignID" "PaidID", "ItemPrice","PaidPrice", "Rest", "Date", "employeeID"
What i need now is :
in the 2nd subform (Income), Control name : "Paiditem" combobox , after update
this control contain " LandPrice,Maintanance,Wate
rprice, telephoneprice, credit,etc"
the code i need should take the prices from the 1st subform (Payement) where "PaidID" in the 1st subform is equal to "PaidID" in 2nd subform (Income) and to put it in "ItemPrice" all this in 2nd subform , but if the PaidID is repeated which means sometimes the memebers are paying the
Maintanance , or Landprice into installments so whenever any of the item is repeated then the Control "itemprice" should take into account that the price is not the one in the 1st subform but it's the "Rest "control in same 2nd subform (Income) where PaidID is the same,
i hope you got my points,
Wish you more success,
i don't know
i tried this :
Me.Cost.ControlSource = "Select ([Forms]![Assign]![Payement].Form![ItemPrice])FROM ([Forms]![Assign]![Payement]) WHERE (([Forms]![Assign]![Payement].Form![Paid_paidID]) = ([Combo22])) "
i tried this one also , with errors... :-)
If Me.Combo22.Recordset.RecordCount = 1 Then
Me.Cost.ControlSource = [Forms]![Assign]![Payement].Form![ItemPrice]
Me.Cost.Value = Me.Rest