Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Public constant (Access 2000)

    I have a public constant called StrNotIn which is
    Public Const strNotIn = " Not In (221,118,119,120,121,122,123,124,960,992,1008,402) "
    Also i have lines in the OnOpen event like that:
    If Parent!Customerid = 123 Then
    ...........
    Could i replace the figure 123 with the constant StrNotIn?
    Something like that:
    If Parent!Customerid = StrNotIn Then
    ..............
    and also in the line
    Select Case Parent![Customerid]
    Case 123
    with
    Select Case Parent![Customerid]
    Case strNotIn

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Public constant (Access 2000)

    No, you can't do that - those are bits of VBA code, not strings.

Posting Permissions

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