Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Recordset issue

I'm trying to set a recordset using the following but it is not limiting the results to the EstID

Set rs = CurrentDb.OpenRecordset("qryEstimateDetailReport", , "[EstID]=" & Me.txtEstID)

What am I doing wrong?
Avatar of mbizup
Flag of Kazakhstan image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Alternatively in VBA, try something like this:

dim strSQL as string
strSQL = "SELECT * FROM qryEstimateDetailReport WHERE [EstID]=" & Me.txtEstID"

Set rs = CurrentDb.OpenRecordset(strSQL)

Open in new window

Avatar of SteveL13


Am getting an error on:

strSQL = "SELECT * FROM qryEstimateDetailReport WHERE [EstID]=" & Me.txtEstID"
Whoops - drop the last quote:

strSQL = "SELECT * FROM qryEstimateDetailReport WHERE [EstID]=" & Me.txtEstID

Open in new window