If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
i have a form called frmVENDOR invoice with a sub form frmsubVENDOR INVOICE
IN the sub form i have unbound textbox "amount" in the subform footer which sums up the amount
on the main form i have unbound textbox "total amount" which picks the value form the sub form footer textbox "amount"
i use the unbound textbox "total amount" for further calculations on a unbound text box
The above works flawlessly
the problem is ...
on the main form i have the following
taxamount.......unbound textbox
taxrate...........bound textbox
on the form current event..
if i put a code like this...
if me.taxrate.value = 0 then
me.taxamount.value = [total amount] + 500
end if
the result on the textbox is 500 even though the total amount has a value of 1000. the actual result should have been 1500.
the unbound textbox "total amount" value is taken as zero even though it has a value of 1000 in it.
after neumerous tries, what i figured out is that the values generated are correct if i put the equation on the control source
but if i try the same through an event like form current, the value generated is as shown above.. its taking the textbox value as zero...
with [total amount] is expecting to find a column called that int he current recordset
try
[total amount].value
or
[total amount].text
I'd stroingly reecommend that you drop using spaces in column / table / control names. use either CamelCase or underscore
eg
TotalAmount
or
total_amount
personally I prefer to prefix control names with the control type
eg
tbTotalAmount.. but thats just my personal preference
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton