Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Location
    Latvia
    Posts
    13

    Exclamation Unanswered: plz help with VB function!

    why it don`t work?!

    Code:
    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
        If Me!PC_serial_code = 84733010 & 84733090 Then
            Me!amount.Visible = False
        Else
            Me!amount.Visible = True
        End If
    End Sub
    tnx

  2. #2
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Hi
    The code you have written will only set the amount object to invisible when the PC_serial_code object contains the string "8473301084733090". This is because you have use the & (concatenate).

    I'm guessing you want to use OR instead of &.
    Chris

  3. #3
    Join Date
    Jul 2004
    Location
    Latvia
    Posts
    13
    tnx Chris

    ok i use OR, but that function dont work eanyway. when PC_serial_code contains 84733010 or 84733090 values in field amount it`s stay visible.
    maybe something is not right in function!?

  4. #4
    Join Date
    Jun 2004
    Posts
    96
    you have to specify which field to check again..

    If Me!PC_serial_code = 84733010 or Me!PC_serial_code = 84733090 Then
    .
    .
    end if

Posting Permissions

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