Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008
    Location
    Colombia
    Posts
    1

    change values after checkbox "YES"

    Hello all.

    Im currently building a DB with Access and Ive found myself coding simple VB lines (its been about 6 years since Ive programmed! im doing allright though.) in order to make it work as I want to, but I ran into a problem and im kind of stuck.



    I have a Calls table with about 5 fields, one of them being "TARIFF VALUES".

    Also I have a Details table which I have among the fields "Taxes in Tariffs" checkbox as well as a "Tax Value" textbox.

    So, what I do is put the "Calls" table as a subform of the "Details", and what I need to have is that when I click the checkbox "taxes in tariffs" in the "details" table, the "tariffs value" field in the subform updates to the same value multiplied by the tax value
    (tariff value * (1+ tax value in %))

    and also if I uncheck it deduces the Tax value

    I figured i'd put the code in the AfterUpdate event of the checkbox, but I just dont know how to tell it to access the subform field Tariff Value for take it and modify it in the

    If taxChk.value=true then
    Calls.???? = Calls.???? * (1 + details.???)



    Can anybody guide me through? i'd really apreciate the help. thanks in advance!

  2. #2
    Join Date
    Oct 2008
    Posts
    2
    I would put something like this in the control source of the textbox of your subform.

    IIF(Forms!Details!["Taxes in Tariffs"],(tariff value * (1+ tax value in %)),whatever)

    I would remove spaces in field names.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 09-25-2008, 12:19 PM
  2. Replies: 1
    Last Post: 09-05-2008, 12:07 PM
  3. Export to .rtf of "104-" converts to "-655&qu
    By Sherri726 in forum Import/Export Data
    Replies: 0
    Last Post: 12-19-2006, 03:16 PM
  4. Replies: 2
    Last Post: 08-31-2006, 12:19 PM
  5. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums