>I have dozens of small and infrequently used tables (remote SQL views) that I need a quick way to develop an ADD form. It does NOT have to be pretty.
>
>I thought of haveing a PRG that is called with file number
>Then a Case statement to open correct table.
>
>I hoped I could use only one generic ADD Form.
>Open the database before I call the form.
>Append blank at form load
>Use EDIT command to show fields (this is a new record and not yet updated)
>Put two command button at bottom Save & Cancel
>Save has a tableupdate(), Cancel has Tablerevert()
>Then thisform.release
>
>YES, this is crude but quick to build.
How about a generic form that allows for editing up to, say, 5 fields. You call the form with parameters that indicate the fieldnames (comma-delimited), and the corresponding descriptions (also comma-delimited), and set the properties for the corresponding TextBoxes and Labels in Form.Init().
You could even generate the TextBoxes and EditBoxes on-the-fly; in this case, you don't need to set an arbitrary limit.
>Question: on EDIT command, can I put it on a Form and can I limit user to editing just that one record?
Yes, with
EDIT NEXT 1
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)