D
dale fye
Sorry, accidentally hit send
A couple of issues.
1. you don't need or want to reference Me when referring
to the parent form, although you could, I prefer the
technique shown below.
2. you need to make sure you do something if the
findfirst method fails to find the value you are looking
for.
Watch out for the line wrap on the strCriteria line
HTH
Dale
*****************************
Dim strCriteria as string
Dim rs as recordset
strCriteria = "[Project Number] = " & Forms("Plan
Status").[ProjectNumber]
set rs = me.recordsetclone
rs.findfirst strCriteria
if rs.nomatch then
docmd.gotorecord ,,,acNew
me.ProjectNumber = Forms("Plan Status").ProjectNumber
else
me.bookmark = rs.bookmark
endif
rs.close
set rs = nothing
A couple of issues.
1. you don't need or want to reference Me when referring
to the parent form, although you could, I prefer the
technique shown below.
2. you need to make sure you do something if the
findfirst method fails to find the value you are looking
for.
Watch out for the line wrap on the strCriteria line
HTH
Dale
*****************************
Dim strCriteria as string
Dim rs as recordset
strCriteria = "[Project Number] = " & Forms("Plan
Status").[ProjectNumber]
set rs = me.recordsetclone
rs.findfirst strCriteria
if rs.nomatch then
docmd.gotorecord ,,,acNew
me.ProjectNumber = Forms("Plan Status").ProjectNumber
else
me.bookmark = rs.bookmark
endif
rs.close
set rs = nothing