Results 1 to 2 of 2

Thread: Queries

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    N Ireland
    Posts
    1

    Post

    How do I set the criteria of a MS Access querry from a Visual Basic form. So that the querry results will change depending on the value entered into a field.

    Thank You.

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284

    Post

    I am not too sure if I understand you correctly but if you are trying to pass a parameter to a query in Access the following will work -

    Dim sql as string
    Dim q as querydef
    set db = dbEngine.Workspaces(0).OpenDatabase_(<database name> )
    q.parameters(<parameter name> ) = <Parameter>
    set rs = q.openrecordset()


    let me know if this is not what you want

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