I am entering daily visit counts to walk-in clinics in our area. There are 6 clinics or sites. So a record is uniquely identified by site and date. Is there a way to prevent the entry of records with a site-date combination that duplicates a site-date combination that already exists in the database?
The easiest is: - assume your file name is walk_in.rec and walk_in.qes
0. make a backup of your data to some other media or drive 1. add a text field (fldcontrol), e.g. length 75 to your walk_in.qes file at the bottom. 2. open the file walk_in.rec for entry 3. entry will ask you to update your rec file with changed structure. accept this with a "yes/ok" 4. close the file without entering any new records 5. add to the chk file the following:
assuming your first field is site and second field is clinic number: site mustenter end
clinic mustenter after entry fldcontrol = string(site) + "-" + string(clinic) end end
fldcontrol noenter key unique end
If you enter any again a warning will come out automatically since the key unique is tested at assignment of the value, not at the field (which is never entered).
Let us know on the list whether this works.
regards Jens Lauritsen