Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    8

    Unanswered: How to returns records via VBA where <NULL> is stored in SQL table

    I added several new columns (nullable) to some existing tables. The new columns now contain <NULL> for the old records.
    If I add new records these columns are blank.

    The following VBA code only returns the new records with the blanks.

    If IsNull(!Work_Mech) Then
    frmMain.txtWorkMech = ""
    Else
    frmMain.txtWorkMech = !Work_Mech
    End If

    How can I retrieve the old records????

  2. #2
    Join Date
    Nov 2004
    Posts
    108

    Post SQL Statement to retrieve records with NULL values

    Code:
    Select *
    From MyTable
    Where newField is null

  3. #3
    Join Date
    Nov 2004
    Posts
    8
    I can retrieve the records in SQL - I am not getting all the records via VB.

  4. #4
    Join Date
    Nov 2004
    Posts
    108

    Question

    what is the code you are using to retrieve the records?

Posting Permissions

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