Results 1 to 4 of 4

Thread: Null Values

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Montana
    Posts
    6

    Post

    I have a text field that I am tying values to based on a SQL string. This works great, until the recordset tries to supply a null value to to the text field's value. I have tried using an if statement to test for the null value, but I'm having trouble testing. Here's a sample of the code...

    If rstMonitor.Fields("Speed").Value = Null Then
    BaseWindow.navigate "HelpDesk_MonitorConfirm.html"
    Else
    hfldSpeed.Value = rstMonitor.Fields("Speed").Value
    End If

    What is the proper syntax to test the field for a null value?

    TIA
    Stephen

  2. #2
    Guest

    Post

    try:
    Code:
    If IsNull(rstMonitor("Speed")) Then
      BaseWindow.Navigate "HelpDesk_MonitorConfirm.html"
    Else
      hfldSpeed.Value = rstMonitor("Speed")
    End If

  3. #3
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Post

    Use the ISNull function

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Montana
    Posts
    6

    Post

    Thanks, these answers get me going!

Posting Permissions

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



Click Here to Expand Forum to Full Width