Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA novice - IF THEN / WHERE

    In Short: I'm trying to write an IF THEN ELSE statement, but want it to occur WHERE one field = another i.e.
    If IsNull(formpicked.frmID) where contacts![contactID]= formpicked![contactID] Then

    It is a form of addresses with a subform of people in each address (linked). On the subform is a button to open a linked form depending on a selection from a dropdown on the main form (dropdown info is from a table which holds form name, auto id fieldname and caption info for the button). I'm trying to make the caption on the button change in 2 ways:
    1. To match the form it opens (this i've done).
    2. To change depending on whether the form holds data about each individual contact.

    Any help with corrections to the above statement would be much appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA novice - IF THEN / WHERE

    <pre>If IsNull(formpicked.frmID) AND _
    contacts![contactID]= formpicked![contactID] Then
    ...
    Else 'Not IsNull(formpicked.frmID) OR _
    contacts![contactID]<>formpicked![contactID]

    ...
    End If </pre>

    Charlotte

Posting Permissions

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