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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Invalid use of Null (A2k (9.0.4402) SR-1)

    Author
    Topic
    #363874

    Invalid use of Null

    A2k (9.0.4402) SR-1

    I

    Viewing 2 reply threads
    Author
    Replies
    • #556783

      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

    • #556804

      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

    • #556857

      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.

    Viewing 2 reply threads
    Reply To: Invalid use of Null (A2k (9.0.4402) SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: