470,613 Members | 1,519 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,613 developers. It's quick & easy.

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_trackingforsearch"
If Field1.Value = "" Or IsNull(Field1.Value) Then

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

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

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

End If
End If
Jul 31 '06 #1
1 1236
let us know, what problem u r facing? what kind of error does ur program showing?

Mahesh
Aug 1 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Ike | last post: by
24 posts views Thread by anders | last post: by
4 posts views Thread by MarcoEffe | last post: by
6 posts views Thread by Paul | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.