Here is my code (Im getting the error: Run-time error '3061':
Too few parameters. Expected 1. "
Private Sub txtGagePoint_Click()
On Error GoTo GagePoint_Enter
Dim db As Database
Dim qry As QueryDef
Dim rst As Recordset
Dim stDocName As String
DoCmd.SetWarnings False
stDocName = "qry_GagePoint"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings True
Set db = CurrentDb
Set qry = db.CreateQueryDef("", _
"Select GagePoint from `tbl_tmpGagePoint`" _
& "Where CamProfile = " & Text89)
Set rst = qry.OpenRecordset()
txtGagePoint = rst!GagePoint
Text89 = rst!CamProfile
Exit_GagePoint_Enter:
Exit Sub
Err_GagePoint_Enter:
MsgBox Err.Description
Resume Exit_GagePoint_Enter
Too few parameters. Expected 1. "
Private Sub txtGagePoint_Click()
On Error GoTo GagePoint_Enter
Dim db As Database
Dim qry As QueryDef
Dim rst As Recordset
Dim stDocName As String
DoCmd.SetWarnings False
stDocName = "qry_GagePoint"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings True
Set db = CurrentDb
Set qry = db.CreateQueryDef("", _
"Select GagePoint from `tbl_tmpGagePoint`" _
& "Where CamProfile = " & Text89)
Set rst = qry.OpenRecordset()
txtGagePoint = rst!GagePoint
Text89 = rst!CamProfile
Exit_GagePoint_Enter:
Exit Sub
Err_GagePoint_Enter:
MsgBox Err.Description
Resume Exit_GagePoint_Enter