Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Records..
Message
 
 
To
12/11/1999 17:33:16
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00290798
Message ID:
00290803
Views:
11
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform