Results 1 to 3 of 3
  1. #1
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117

    If....syntax

    I have the following code on the OnCurrent event fo a page

    Private Sub Form_Current()
    If Me.SAFETY = -1 Then
    Me.Page636.Visible = True
    Else
    Me.Page636.Visible = False


    End If
    If Me.TRAINING = -1 Then
    Me.Page643.Visible = True
    Else
    Me.Page643.Visible = False
    End If
    If Me.REPORTTYPE = "REJECT" Then
    Me.Page31.Visible = True
    Else
    Me.Page31.Visible = False
    End If
    End Sub


    I want to add another REPORTTYPE to the existing "REJECT". It is "REJECT - No Insp"
    Can anyone tell me how this is to written - I have tried several ways but none will work

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Use an Or clause

    Code:
    If Me.REPORTTYPE = "REJECT" or Me.REPORTTYPE = "REJECT -No Insp" Then ...
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Thanks for your help.
    Not sure what you mean about the star below the post.......

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

Similar Threads

  1. Guide for interpreting MSDN / MS documentation syntax-syntax !!
    By pisorsisaac@gmail.com in forum Access
    Replies: 4
    Last Post: 11-18-2017, 07:07 AM
  2. Convert SQL Server Syntax To Access Query Syntax
    By chalupabatman in forum Queries
    Replies: 1
    Last Post: 10-18-2017, 08:53 PM
  3. Please help with syntax
    By mshaynerush in forum Programming
    Replies: 5
    Last Post: 10-11-2013, 11:27 AM
  4. Help with syntax
    By accesskid in forum Forms
    Replies: 3
    Last Post: 06-02-2011, 05:14 AM
  5. Incomplete Syntax Clause (syntax error)
    By ajetrumpet in forum Programming
    Replies: 4
    Last Post: 09-11-2010, 10:47 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