Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2001

    Unanswered: Code on form not working as it should

    I have 2 unbound fields and a button on a form.

    One unbound field is a drop-down list that select the invoice number and amount from a table. When the invoice number is selected, it populates the second unbound field with the amount on the invoice selected.

    Behind the button is some code which begins with the following:
    x = Me!Combo55 ------ Me!Combo55 is the drop-down list mentioned above
    xx = Val(Me.amount) -------- amount is the second unbound field above

    My problem is when I select the Invoice number, the amount appears in the other unbound field as it should. However when I click the button, x equals the invoice number (as it should) but the variable xx = 0 and not the amount. If I type in the amount in the unbound field, then my variable xx holds the correct value when I click the button.

    Where am I going wrong?

    Last edited by toukey1; 04-27-10 at 23:50.

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    You can try:
    xx = Val(Me.amount.Value)
    Otherwise, please post the whole code, not just some sparse lines of it.
    Have a nice day!

Posting Permissions

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