PDA

Click to See Complete Forum and Search --> : Queries


srt
Feb 7th, 2000, 03:30 AM
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.

Bigley
Feb 8th, 2000, 06:46 AM
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