Can anyone help please?
I have used dcount to check the number of records for a query. If there is more than one matching record then a window pops up allowing the user to identify the correct record before proceeding. If there is only one record then the front end form opens with the data populated.
However, when multiple records are found my form still opens but blank.
I have:
if dcount(etc) >1 then openquery
if dcount(etc) <2 then set parameter value
openform
exit sub
end if
I've tried loads of alternatives but either get the form not opening when there is one record or it opens with the first found record.
Any ideas how best to split it or force access to only open form when dcount <2
Cheers
I have used dcount to check the number of records for a query. If there is more than one matching record then a window pops up allowing the user to identify the correct record before proceeding. If there is only one record then the front end form opens with the data populated.
However, when multiple records are found my form still opens but blank.
I have:
if dcount(etc) >1 then openquery
if dcount(etc) <2 then set parameter value
openform
exit sub
end if
I've tried loads of alternatives but either get the form not opening when there is one record or it opens with the first found record.
Any ideas how best to split it or force access to only open form when dcount <2
Cheers