I am still haveing trouble with this code.
'Get name
Set dbInst=CurrentDb
Set rstInst=dbInst.OpenRecordset("Instrument",dbOpenDynaset&_
strCriteria="[InstCode]="&Trim(Str(OpenArgs))
rstInst.FindFirst strCriteria
strID=rstInst![name]
InstCode=OpenArgs
I put a breakpoint on the line that starts strID,then open the form (run the debugger), and I get a syntax error message ( missing operator)
If I put a breakpoint on the findfirst line, the form opens with no error message.
The code looks OK to me. How can this be happening?
'Get name
Set dbInst=CurrentDb
Set rstInst=dbInst.OpenRecordset("Instrument",dbOpenDynaset&_
strCriteria="[InstCode]="&Trim(Str(OpenArgs))
rstInst.FindFirst strCriteria
strID=rstInst![name]
InstCode=OpenArgs
I put a breakpoint on the line that starts strID,then open the form (run the debugger), and I get a syntax error message ( missing operator)
If I put a breakpoint on the findfirst line, the form opens with no error message.
The code looks OK to me. How can this be happening?