Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Again: Can't have VBA behind tables and queries. Build a form to use as a subform. The form will be the SourceObject of the subform container control.



    Code goes in the AfterUpdate event of [Local X] textbox on subform.

    Why using LIKE operator? LIKE is only useful with wildcards. Just use =.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #17
    gatsby is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    114
    okay will try to test this one. thank you so much.

    yes i agree with VBA behind tables and queries but how about multiple validation rules there (not VBA or coding) just plain validation rules using expressions?

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Think I finally get your question. Maybe. I am now testing an IIf expression in ValidationRule. Seems to be working. So might be able to do:

    IIf(lkpAssembly="Deck", Nz(Me.[Local X], 0) < 5 Or Nz(Me.[Local X], 30) > 25, IIf(lkpAssembly="DSF",...)))))
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #19
    gatsby is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    114
    yup. i tried that iif also since i did a lot of research on this prob but i cant get it right and the last resort is to have a vba coding and im not good at it, so im here.

    anyway, will try your suggestion tomorrow. will let you know if i got it right, i hope so at least. thanks for your time June7, i really do appreciate it.

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I first tested this expression:
    IIf(1=1, "02", "03")

    That worked.

    I tried:
    IIf(1=1,>"10" And <"15",>="01" And <"10")

    That didn't work.

    Then I tested with a field:
    IIf([Division]="LLBB", >"10" AND <"15",>="01" AND <"10")

    That didn't work either.

    So I am thinking the answer is No. Hence the VBA code to validate entry.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #21
    gatsby is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    114
    yah no choice but VBA. been researching that for days also. i still have lots of questions about MS Acess, because this software or application is quite good for database. and this forum is nice also for people who wants to know more about MS Access.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-28-2012, 10:01 AM
  2. Validation Rule
    By Darkladymelz in forum Reports
    Replies: 2
    Last Post: 09-15-2011, 07:43 AM
  3. Validation Rule
    By rbiggs in forum Forms
    Replies: 4
    Last Post: 08-23-2011, 05:24 PM
  4. Validation Rule
    By ritzzy in forum Access
    Replies: 1
    Last Post: 04-13-2011, 01:33 PM
  5. Validation Rule
    By mistaken_myst in forum Database Design
    Replies: 2
    Last Post: 10-29-2007, 02:08 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