I'm trying to use the FindLast method to look up a patient's last visit by visitid when adding a new visit. When I add a new visit I would like it to look up their last visit and use the values in some of the fields as the default value of the new visit. Does that make sense? The visitid is an autonumber. I have found several examples online and in my books but no luck.
an example of one of my many attempts (I am not a VB programmer):
dim rst as recordset
dim strcriteria as string
strcriteria = "visitid="""" & visitid & """"
set rst=me.recordsetclone
rst.findlast strcriteria
if not rst.nomatch then
BPRx=rst!BPRx
end if
Any help would be great!
an example of one of my many attempts (I am not a VB programmer):
dim rst as recordset
dim strcriteria as string
strcriteria = "visitid="""" & visitid & """"
set rst=me.recordsetclone
rst.findlast strcriteria
if not rst.nomatch then
BPRx=rst!BPRx
end if
Any help would be great!