VB 6 Code producing an error...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • denvermuseka
    New Member
    • Nov 2011
    • 5

    VB 6 Code producing an error...

    If Trim(Text4) = "" Then
    clsbooks.Search BooksFrm lstBooks, ""

    Else
    clsbooks.Search BooksFrm lstBooks, Text4.Text

    End If
    'the code produces an error written:

    Run-time error 424
    Object Required
  • lee123
    Contributor
    • Feb 2007
    • 556

    #2
    maybe you should try this

    [CODE]
    Code:
    If Trim(Text4.text) = "" Then
         clsbooks.SearchBooksFrm lstBooks = ""
    Else
         clsbooks.SearchBooksFrm lstBooks = Text4.Text
    End If
    its kinda hard to understand you question, "1stbooks" a field?
    if so then the code should be like this

    Code:
    If Trim(Text4.Text) = "" Then
        clsbooks.SearchBooksFrm.lstBooks = ""
    Else
         clsbooks.SearchBooksFrm.lstBooks = Text4.Text
    End If

    Comment

    Working...