Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2012
    Posts
    11

    Question Text Box with if statement

    Hi, Not sure if this is OK but...

    I am inserting a text box onto a form which will show the text "Bonus Due" if a date in another text box (called text43) matches todays date. If it doesn't match todays date then the text just says "No Bonus due".

    I thought using an IF statement would do this.

    Does anyone have any suggestions. I did try this....

    =if([text43]=Date(),"Bonus Due","No Bonus Due")

    It doesnt work.



    Anyone know why 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,640
    For starters, it's IIf, not If (If only works in VBA code). If it still doesn't work, is it possible the textbox has a time component in it?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Jan 2012
    Posts
    11
    Many thanks. Sorted!!! I've also passed on this to another user who had a similar issue so its two birds with one stone!!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Happy to help!
    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: 2
    Last Post: 03-01-2012, 12:21 PM
  2. IIF statement in control source of text box
    By LilMissAttack in forum Reports
    Replies: 11
    Last Post: 08-18-2011, 10:02 PM
  3. Replies: 7
    Last Post: 08-17-2011, 01:49 PM
  4. Replies: 15
    Last Post: 04-01-2011, 11:41 AM
  5. Replies: 1
    Last Post: 11-05-2010, 04:31 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