unbound text box

krishnanhemanth

Registered User.
Local time
Tomorrow, 03:14
Joined
Jun 12, 2009
Messages
115
hi every body
iam in a very bizzaire situation
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...
what could be wrong

plz help
krishnanhemanth
 
since the "total amount" textbox is in the subform and the "taxamount" textbox is in the main form, you need to reference the "total amount" text box with a "full path" meaning
Forms!MainForm!SubForm!total_amount_txtbox

Replace MainForm,SubForm,total_amount_txtbox with your form's equivalent
P.S. I don't have access available right now so you might have to play around for the exact syntax.If that doesn't wok as it is, you might need "." instead of "!" or you might need to use backets for "total_aount_txtbox"
I'm @ work now and my PC is having some issues with access today:rolleyes:
 

Users who are viewing this thread

Back
Top Bottom