Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Invalid use of Null (A2k (9.0.4402) SR-1)

    Invalid use of Null

    A2k (9.0.4402) SR-1

    I

  2. #2
    Star Lounger
    Join Date
    Nov 2001
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invalid use of Null (A2k (9.0.4402) SR-1)

    Are you sure that you are referring to the correct column in the combo box? Combo boxes are 0 (zero) based so the first column is Column(0). I have tried what you are doing and it is working for me.

    hth,
    Jack

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invalid use of Null (A2k (9.0.4402) SR-1)

    John,

    A yes/no field has 3 possible status.
    Yes, No end Null
    Null means that that field had not been set to yes or no. In fact the field is empty.
    A way to avoid the empty status, is to assign a yes or no as default in the design of the table.
    Another possibility is to use the Nz function.
    blnActive = Nz(Me![lngTypeID].Column(31),0) ' for a default no
    blnActive = Nz(Me![lngTypeID].Column(31),-1) ' for a default yes
    Francois

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

    Re: Invalid use of Null (A2k (9.0.4402) SR-1)

    In addition to the rest of the information you've been given, it would be a good idea to explicitly coerce the string value of the combobox column into a boolean by using the CBool() function around it.
    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
  •