Change the colour of data entry form; and entering contact number for each person
Dear colleagues,
I am designing relational database and would like the data entry staff to be able to enter the identification number (idno) and not to have to type in the contact number of each idno (person). The field for the contact number should be field automatically for each idno. More importantly, it should start with one for each idno.
For example for idno 001 contact 1; 2; 3; 4; 5; 6; 7; 8; 9; 10 for idno 002 contact 1; 2; 3; ..................................100
Clearly, given that idno is a string; I have tried the following command which IDNO AFTER ENTRY IF IDNO=IDNO THEN LET CONTACTNUM=1+RECORDCOUNT ENDIF END The result is not different from automatic contact number. Any suggestions will be appreciated.
Thank you for your time and suggestions
Tieble
Here is one solution that requires you to have a field in the main case .rec file that holds the number of contacts entered so far. It may not be perfect, but should work for data entry and record review just fine.
There are 4 files in my example main.qes - the Main case file main.chk contact.qes - the Contact file contact.chk
The .chk files pass the highest contact number back and forth using the global variable xcon and the data entry person cannot change the contact number.
The "before record" block in contact.chk increments xcon to give the next contact number, but this only gets saved back to main.rec when a new record is saved. If only existing records are revised and saved, the number of contacts does not change.
This is a example of related files communicating with each other through a global variable.
I hope this helps.
Jamie Hockin Ottawa
On 2010-03-16, Tieble wrote:
I am designing relational database and would like the data entry staff to be able to enter the identification number (idno) and not to have to type in the contact number of each idno (person). The field for the contact number should be field automatically for each idno. More importantly, it should start with one for each idno.
participants (1)
-
epidata-list@lists.umanitoba.ca