Results 1 to 6 of 6
  1. #1
    eww is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    125

    Macro Condition

    I've got a check box that I've set up with an embedded macro that when clicked sets the enabled property of another field to "true". However, I noticed that if the box was clicked again that field would still be enabled.

    I tried using a condition on it to say (it's a checkbox for a if a seperate address is required) [SeperateSubmittalAddress]="Yes" but this does not seem to work at all.

  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
    Try without the quotes around Yes. With quotes you are comparing to a literal string, not a Yes/No value.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    What occurs to me in reading your post is that you have an event trigger and vb to make it 'true'.

    But I don't read where you have an event trigger and vb to make it 'not true'. Checking that same box again will not return it to 'not true' if there is not the vb to do so... perhaps I'm missing something on this point. maybe this helps.

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Totally agree with NTC.

    But I don't think [SeperateSubmittalAddress]=Yes will work, Yes is not defined by Access, not like true or false.

  5. #5
    eww is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    125
    NTC, you're totally right. Didn't even think of that and it makes total sense, AND it works. Thanks a bunch .

    And it does work as [SeperateSubmittalAddress]=Yes just for future reference in case anyone else has problems with this. Although I just saw that you use Access 2003 (while I'm using '07) so there might have been a few changes made in that area, I'm not sure.

  6. #6
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    All right. my mistake.

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

Similar Threads

  1. Where Condition - form error
    By catat in forum Forms
    Replies: 5
    Last Post: 07-15-2010, 07:40 AM
  2. condition in macros
    By frcastro in forum Programming
    Replies: 1
    Last Post: 06-23-2010, 03:16 AM
  3. Like condition for 1 column help pls!
    By stodd in forum Queries
    Replies: 1
    Last Post: 03-14-2010, 01:51 AM
  4. hours + condition
    By Miriam in forum Queries
    Replies: 0
    Last Post: 08-09-2009, 06:46 AM
  5. How to use IIF condition
    By nshaikh in forum Queries
    Replies: 4
    Last Post: 09-12-2008, 01:23 AM

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