Results 1 to 2 of 2
  1. #1
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143

    If statement on a field in a form

    I have a form with a received from field and a Carol Fee field.
    Received from is a drop-down select and Carol Fee is a currency field.


    I want Carol Fee to be $20 when Received from says Primary.
    I have tried many ways code or expression builder. and I must not be doing something correctly.
    Help Please.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would add a field to the table the drop down gets it's selections from and do this:

    http://www.baldyweb.com/Autofill.htm

    That would be more dynamic and maintainable. To do what you ask, code in the after update event of the combo:

    Code:
    If Me.ComboName = "Received" Then
      Me.CarolFee = 20
    End If
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 7
    Last Post: 04-10-2014, 02:22 PM
  2. Replies: 3
    Last Post: 05-06-2013, 03:03 PM
  3. Referencing a form field in a VBA statement
    By Historypaul in forum Programming
    Replies: 4
    Last Post: 02-09-2013, 01:22 AM
  4. If statement in form field
    By Gabriel2012 in forum Forms
    Replies: 1
    Last Post: 01-29-2013, 05:03 PM
  5. If Statement to validate Field on a Form
    By ETCallHome in forum Forms
    Replies: 4
    Last Post: 04-05-2011, 05:22 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