Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    58

    Unanswered: help with vb query

    Hello,

    I wonder if somebody could help me out here as i am getting confused. i want to search my access DB based on surname and forename. It works great if i search on surname but I just get muddled up when trying to combine both the surname and the forename fields.

    Below is the code i use to search by surname:

    Set rs1 = db.OpenRecordset("SELECT * FROM query1 " & "WHERE surname = " & "'" & txtsurname.Text & "'", dbOpenDynaset)

    lblparent.Caption = rs1("parent")
    lblhouse.Caption = rs1("house_no")
    etc..


    thanks in advance
    neil

  2. #2
    Join Date
    Feb 2002
    Posts
    13
    could you show the code which is not working?

Posting Permissions

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