Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding records to a table via combobox
Message
From
10/05/1998 06:21:16
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
07/05/1998 16:39:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00097388
Message ID:
00098356
Views:
38
>You and Nick both bring up a point I am just now starting to think about using a combobox to add new values to a table - namely, is this the kind of situation where I should use table buffering? I'm asking because if I were adding fields in the normal way through some kind of file maintenance form, I would. But what I'm trying to do here is circumvent the normal rules by allowing a value to be added to the table on the fly. I'm not even taking into account that (e.g.) they add this city and oops they mispelled it or something. I just figured they could go into a form maintenance routine and do all that stuff. But I guess the biggest issue is that someone else is using the table. Anyway, I'd appreciate your thoughts on this (clearly you allow for this in your class).
>
>Sylvia

This is one of the reasons I don't use combos neither for search, nor for populating lookup tables as well. I let the user enter a value (name, code, whatever). If it should exist in a lookup table, I check there, and as a feedback usually fill up some other read-only textbox(es) (i.e. if it was a code, I show the name, and maybe adress, unit of measure or whatever). If it's not there, I bring up a search grid (positioned at the best-guess position). The user searches the grid (incremental search on several columns), and if the item's not there, there's a button (or keypress of Insert) which brings up the entry form for that table. Afterwards, the grid is repopulated, and the newly added record is picked from it. This way I don't have two places where the records can be added; makes maintainance easier, and forces the user to check if there may be an existing record, thus mostly preventing double entries.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform