How do I allow a user to view duplicates when entering into a form

N

Nefelim

I have a form linked to a query that searches for duplicates when entering
info. When the user runs the form it asks for the patient# and if there is an
entry in the table for that patient# it will bring it up on the form. If
there is no entry for that patient# in the table then it brings up the blank
form to enter the info. The user is allowed to enter duplicate account#'s but
they need to check to make sure the same date of service is not already
listed. I would like for the user to be able to view all duplicates in
datasheet view when they enter the account# (because there may be multiple
dates of service) and then have a dialogue box pop up to ask them if they
would like to enter a new date of service. If there are no duplicates I would
like for the form to go directly to add mode. Is this possible and if so how
do I do it? Thanks.
Curtis
 
F

fredg

I have a form linked to a query that searches for duplicates when entering
info. When the user runs the form it asks for the patient# and if there is an
entry in the table for that patient# it will bring it up on the form. If
there is no entry for that patient# in the table then it brings up the blank
form to enter the info. The user is allowed to enter duplicate account#'s but
they need to check to make sure the same date of service is not already
listed. I would like for the user to be able to view all duplicates in
datasheet view when they enter the account# (because there may be multiple
dates of service) and then have a dialogue box pop up to ask them if they
would like to enter a new date of service. If there are no duplicates I would
like for the form to go directly to add mode. Is this possible and if so how
do I do it? Thanks.
Curtis

Why not check to see if there are entries for that patient AND that
same date of service at one time.

On your ?Form, ask for the PatientID and the DateOfService.

If DCount("*","TableName","[PatiendID] = " & Me!PatientID & "
[DateOfService] = #" & Me![DateOfService] & "#") >0 Then
'This patient has a record on this date.
'What do you want to do now
End If
 
Top