Results 1 to 3 of 3

Thread: unbound textbox

  1. #1
    Join Date
    May 2009

    Unanswered: unbound textbox

    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


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    with [total amount] is expecting to find a column called that int he current recordset
    [total amount].value
    [total amount].text

    I'd stroingly reecommend that you drop using spaces in column / table / control names. use either CamelCase or underscore

    personally I prefer to prefix control names with the control type
    tbTotalAmount.. but thats just my personal preference
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    Is me.taxrate.value really 0 ?

    Are you actually entering 0 into it, or is the Default Value for the Field set as 0?

    Unless one of the options above is true, if the taxrate Textbox is simply empty, it is Null, not 0.

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts