Hi Jamie,
Thank you very much; it worked in my hands and I managed to reproduce it successfully. I will try to apply it to the entire multilevel database
Tieble London, UK
On 17 March 2010 17:00, epidata-list-request@lists.umanitoba.ca wrote:
Send EpiData-list mailing list submissions to epidata-list@lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit http://lists.umanitoba.ca/mailman/listinfo/epidata-list or, via email, send a message with subject or body 'help' to epidata-list-request@lists.umanitoba.ca
You can reach the person managing the list at epidata-list-owner@lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list ___________________________________
Today's Topics:
- Change the colour of data entry form; and entering contact number for each person (epidata-list@lists.umanitoba.ca)
- Re: Change the colour of data entry form; and entering contact number for each person (epidata-list@lists.umanitoba.ca)
Message: 1 Date: Tue, 16 Mar 2010 19:41:03 +0000 From: epidata-list@lists.umanitoba.ca Subject: [EpiData-list] Change the colour of data entry form; and entering contact number for each person To: epidata-list@lists.umanitoba.ca Message-ID: bf1bb7701003161241o6a547b5fxd5d665ca74b6398b@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1
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
Message: 2 Date: Tue, 16 Mar 2010 19:30:09 -0400 From: epidata-list@lists.umanitoba.ca Subject: Re: [EpiData-list] Change the colour of data entry form; and entering contact number for each person To: epidata-list@lists.umanitoba.ca Message-ID: BLU0-SMTP90051533776303A978B93FFD2D0@phx.gbl Content-Type: text/plain; charset="us-ascii"
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.