I am trying to write an update query in MS Access to update a count field in my database. I have a table that has records with multiple fields for every time a surveyor goes to a particular survey point. The surveyor enters information into the database to populate the fields including the point number([Survey_point]), the date([Date_surveyed]), time, etc. and usually goes to point multiple times in a year (but not always).
I would like to add a field called "Visit_Coun t" and update the value to indicate which visit it is for a given year. So, if the surveyor visits the point a single time in one year, Visit_Count = 1 for that record. But if the surveyor goes to the point 10 times, the first record for a particular sample point Visit_Count = 1, the second = 2, and so on. I have no problem querying the total visits for each point, but I can't figure how to determine that on date X [Date_surveyed](which is stored in record Y[ID]), it was the surveyor's ?th visit ([Survey_count]).
So to simplify, here is a reduced list fields in the table:
ID
Surveyor_ID
Survey_Point
Date_surveyed
Survey_Count 'need to update this field
I would be grateful if anyone could point me in the right direction! Thanks.
I would like to add a field called "Visit_Coun t" and update the value to indicate which visit it is for a given year. So, if the surveyor visits the point a single time in one year, Visit_Count = 1 for that record. But if the surveyor goes to the point 10 times, the first record for a particular sample point Visit_Count = 1, the second = 2, and so on. I have no problem querying the total visits for each point, but I can't figure how to determine that on date X [Date_surveyed](which is stored in record Y[ID]), it was the surveyor's ?th visit ([Survey_count]).
So to simplify, here is a reduced list fields in the table:
ID
Surveyor_ID
Survey_Point
Date_surveyed
Survey_Count 'need to update this field
I would be grateful if anyone could point me in the right direction! Thanks.
Comment