Hello, I am building a patient database for my office and I am learning Access as I go.
I have a multi table query that I am building to be the basis of a report that will (among other things) display all of the blood draws that our phlebotomists have performed that day - Our Company Bills a higher rate for the first blood draw than we do for subsequent blood draws.
I have an Event table (date, location, etc.) and a Patient table (name, contact info, etc.). I want to build a formula that recognizes if a patient is the first patient for that event - I think I can do this by comparing the EventID (which is an AutoNumber) against the PatientID (also an AutoNumber) but I have no idea how to do it.
As an example I would like my query to look something like this (where the 'FirstPatient' field is being determined as a function of the query):
EventID EventDate EventLocation PatientID PatientName FirstPatient 5 3/3/2017 MEMPHIS 25 JOE True 5 3/3/2017 MEMPHIS 26 SALLY False 6 3/3/2017 LOS ANGELES 27 BILL True 6 3/3/2017 LOS ANGELES 28 JANE False 6 3/3/2017 LOS ANGELES 29 FRED False 7 3/3/2017 MIAMI 30 JILL True
*the result doesn't need to be True/False it can be 1/0 or Yes/No... I don't really care.