R
Robert
I am using the following sub procedure on a form to update
fields. When testing the variables in the immediate
window, the values returned are correct. However, when
executing with a command button, the OpeningUnleaded is
updated to "Null", not the intended value. Any help is
greatly appreciated and we thank you in advance.
Me.OpeningUnleaded = DLookup
("BalanceUnleaded", "tblFuel", "forms!frmFuel!frmDailyFuel!
EOD=forms!frmFuel!frmDailyFuel!EOD-1")
Me.BalanceUnleaded = (Me.OpeningUnleaded +
Me.PurchasedUnleaded - Me.SalesUnleaded)
Me.TotalUnleaded = (Me.CostUnleaded * Me.SalesUnleaded)
fields. When testing the variables in the immediate
window, the values returned are correct. However, when
executing with a command button, the OpeningUnleaded is
updated to "Null", not the intended value. Any help is
greatly appreciated and we thank you in advance.
Me.OpeningUnleaded = DLookup
("BalanceUnleaded", "tblFuel", "forms!frmFuel!frmDailyFuel!
EOD=forms!frmFuel!frmDailyFuel!EOD-1")
Me.BalanceUnleaded = (Me.OpeningUnleaded +
Me.PurchasedUnleaded - Me.SalesUnleaded)
Me.TotalUnleaded = (Me.CostUnleaded * Me.SalesUnleaded)