I think a screenshot will be more use than some partly developed code.
I thought I had it cracked with the -1 multiply but it's not a complete solution.
The form will do what I want it to, it's all about presentation and shielding the user from negative values when they don't expect to see them, it's a confusing distraction. The form must do payments to suppliers, and receipts from customers, and the reversal treatment is different for each, according to the value of bCredit.
Main form has two subforms, each subform holds a datasheet.
Each datasheet has a different data source.
The form design screenshot is the sub form for the top half of the main form.
I want some way of negating the values coming from the table before they appear on the form, but I want to be able to control when this is done, because a supplier payment will want different treatment to a customer receipt.
I've been playing around with MyTestFunction but it doesn't work, I get ?Name in the Gross Value column. Which when you think about it, won't work, because MyTestFunction is in the main form, which is where I assess the value of bCredit.
So can I put (thinking around this) a user defined function in Control Source, that references the value of bCredit in the main form ?
I could cop out and just copy the form and code into a new form and adjust it for each scenario, frmPayment, and frmReceipt, but I'm hoping I won't need to do that.
Actually, having just typed that, maybe I should just have a different sub form for each scenario?
So if it's a payment, set the sub form to sfrmPaymentMatchDsheet and if it's a receipt, set the sub form to sfrmReceiptMatchDsheet. Which, DBguy, is what you've hinted at. Hmmmm...
https://photos.app.goo.gl/isWZXieEk7ZrBh499