>I have a form with 4 checkboxes. Each check box represents the number of records that needs to be added to a table with the same patient id. For example:
>
>patient id 333-3332-33331
>
>The user receive a registration form and an annual form. So therefore they check those two boxes.
>
>Now when the user wants to add the records and presses submit forms button, I want it to appen to the table two different records.
> Field struc: id,c(12), typeofform, c(20)....
>
>So once they submit the forms, the table will contain two records but the only difference will be the typeofform field containing...
>REGISTRATION in one record
>ANNUAL in the other record
In the click event of your submit button, just append two records. Note I am assuming that the patient id is in a var called lcPatientId
SELECT PatRegTable
APPEND BLANK
REPLACE PatRegTable.id with lcPatientId
REPLACE PatRegTable.typeofform with "REGISTRATION"
APPEND BLANK
REPLACE PatRegTable.id with lcPatientId
REPLACE PatRegTable.typeofform with "ANNUAL"
It seems though that you could also possibly change your table so that each patient would only have one record. There would then be a T/F indicator for each type of form. It would look something like this.
PatRegTable
===========
Id C(10)
RegForm L
Annual Form L
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement