G
Guest
Hello
I got several forms that can use the same queries and /or reports and I
would like to some how set an criteria from the forms
I’m tyring the following
DoCmd.OpenQuery “qryNAMEâ€, Acview, , criteria
On my form I would have a txtbox
My code
Dim str as String
Str = Me.txtBoxID.Value
DoCmd.OpenQuery “qryNAMEâ€, , where (qryNAME.NameID = str)
I don’t wish to use the [form]![frmName]![txtBoxID] in the query because
it’s a main query I use all the time and some times I have no criteria.
Can this be done.
I got several forms that can use the same queries and /or reports and I
would like to some how set an criteria from the forms
I’m tyring the following
DoCmd.OpenQuery “qryNAMEâ€, Acview, , criteria
On my form I would have a txtbox
My code
Dim str as String
Str = Me.txtBoxID.Value
DoCmd.OpenQuery “qryNAMEâ€, , where (qryNAME.NameID = str)
I don’t wish to use the [form]![frmName]![txtBoxID] in the query because
it’s a main query I use all the time and some times I have no criteria.
Can this be done.