Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Advice on Project Design
Message
 
To
16/07/2000 16:14:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00393049
Message ID:
00393221
Views:
14
>For the Edit, is it better to close the form and open a new one with that record, or lock the dropdown and unlock the other objects? Why? (I would prefer the latter for convienence)

OK, I'm going to take opposite side of the fence on this one although I do see Larry's point in his answer.

I prefer to do the separate edit form for several reasons. First off, to spread the complexity of different 'modes' (e.g. - add or append mode, and edit mode) out in order to keep the originating form easier to figure out at a later date. Plus it keeps the originating form's purpose to display data only. Once you start making a form have multiple purposes, you end up doing a lot of work with enabling/disabling controls and possibly menus and toolbars too... end result in my experience is once you get all the quirks of handling those different modes worked out, the code behind the form looks like spaghetti code.

I also prefer the separate edit form because when my users go to add or edit a record, I want them to be locked into that action with a modal form. IOW, I dont want the user to wander off to another form or menu option in the middle of adding/editing a record. But if the user is only displaying data, I like to give them the flexibility of a non-modal form so that they can do more than one thing at a time.

What I usually do is have one form for displaying data, and one form for both adding and editing records. That way my display data form doesn't have to be modal, and I can build in a lot of functionality to make the data being displayed as useful as possible (i.e. - show info from other related tables, allow the user to sort and search data, etc.). Then on my add/edit form, handling the two different modes is only matter of setting the form's caption to either "Add" or "Edit", and knowing whether to issue a TABLEUPDATE or INSERT when a SAVE button is clicked. But again, when your form is dedicated to a single purpose (displaying data vs. data entry) it's much easy to add functionality without breaking anything a later point in the app's life cycle.
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Previous
Reply
Map
View

Click here to load this message in the networking platform