>> >>I have another problem here about form design.
>> >>
>> >>I use an "Add command" button of a Buttonset in my form to add new
>> records. After entered one record, i.e., it went to the last page of my
>> pageframe, I want to continue to enter more records without clicking "Save
>> command" botton for each record enterd. How should I do this?
>> >
>> >It completely depends on your design. If for some reason you want to keep
>> bunch of entries and then add them at once, you could collect entry records
>> in cursor and at the end append cursor records to a table. Personally, I
>> would say that it would be strange design. Or maybe I misunderstood your
>> question?
>>
>> You didn't misunderstand my question. The form I am working on is a data
>> entry screen for clerks to enter records from a survey study. Since there
>> will be quite a lot records to be entered each time, clicking Add and Save
>> buttons for each record entered would be time consuming. Of couse, I would
>> like to be able to have data saved automatically after each entry without
>> clicking the Save botton as I used to do in the old fashion Dabse forms.
>> But I could not figure out how.
>
>Set up some common code to Save the information. In the Save button
>click have:
>
>thisform.Save
>thisform.release
>
>In the Add button click have:
>
>if {NewInformation}
> thisform.save
>endif
>thisform.PageFrame.ActivePage = 1
>thisform.Control1.SetFocus
In addition to Edward & Paul's suggestions, you could add a form paramter "lAddMode" which is set to TRUE when the user has clicked the Add Button. Then you can check this value in your last data-entry field (valid or lostfocus events). If TRUE, then automatically save the present record and add a new blank record. If FALSE (editing mode) then simply save or do nothing.
Barbara