Running a query with parameters
Hi All
I'm trying to run a query using docmd.openQuery. The query I want to run accepts 1 parameter which is located in the current form this is open in and running from. I tried doing something like this
Code:
Private Sub Form_AfterUpdate()
With DoCmd
.SetWarnings False
.OpenQuery (staffRecodUpdateTime [Form]![View Employee]!Text187.Value])
.SetWarnings True
End With
End Sub
but its not valid syntax. Any help would be gladly appreciated?
Re: Running a query with parameters
use DAO or ADO (depending if you are running from Access or Excel/VB respectively).
Stay away from docmd to open recordsets :)
I think there are some sticky threads at the top of this forum that may assist you. Otherwise post back with some code.