Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    Washington, DC
    Posts
    116

    Unanswered: Data Validation Using If Then Statement

    Hi! I'm trying to write the following

    If me.SubComp.value = "Subcomponent" Then me.Subcomponent.Value = [Is Not Null or is not = to 0]

    I'm not sure what I should be writing to say that the Subcomponent.value must have something in it. Can anyone help?

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    What are you trying to do??? What do you mean by:"to say that the Subcomponent.value must have something in it"? Perhaps a messagebox? Or is there some value to be assigned?
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    everything after "Then" makes absolutely no sense.

    Are you trying to do this?

    If nz(SubComp.value, "") = "" Then
    'Do Some Stuff
    End If
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    It sounds to me like cross field validation. Sort of like (pseudo code):
    Code:
    If me.SubComp.value = "Subcomponent" Then 
    me.Subcomponent.ValidationRule= Subcomponent <> 0
    End If
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •