sQuery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmartin
    New Member
    • Jul 2006
    • 1

    sQuery

    Hello . . . new to the community and very much a Visual Basic novice.

    Have built a form in MSAccess 2000/02. Form is designed to keep users from going into the Design view and creating queries. So far my coding works on first two blank form fields of the form (5 in all). Having trouble incorporating the next field, Field3.value

    Below is my coding so far. Any advice is greatly appreciated.

    Dim StDocName As String
    Dim sQuery As String

    StDocName = "frm_inspection _trackingforsea rch"
    If Field1.Value = "" Or IsNull(Field1.V alue) Then

    Else
    sQuery = "RG LIKE '" & Field1.Value & "*'"
    End If

    If Field2.Value = "" Or IsNull(Field2.V alue) Then

    Else
    If sQuery = "" Then
    sQuery = "SER LIKE '" & Field2.Value & "*'"
    Else
    sQuery = sQuery & " AND SER LIKE '" & Field2.Value & "*'"

    End If
    End If
  • Mahesh_Bote
    New Member
    • Jul 2006
    • 26

    #2
    let us know, what problem u r facing? what kind of error does ur program showing?

    Mahesh

    Comment

    Working...