Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for dupe ID...
Message
De
25/01/2001 15:35:39
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Check for dupe ID...
Divers
Thread ID:
00468745
Message ID:
00468745
Vues:
42
VFP 6.0

In spite of my confusion, I am going back to square one! Now, I changed the PERSON table, ID field (person.id) index to Candidate key (named the index 'main'). On the form, upon clicking the 'Add' button, I have ALL fields remain disabled, but one, which is the person.id (so that I can program step by step). Yes, this is going to be for multi-users. I know this may be in somewhere in the books, but I want to ask here...

Now, for the form, can I have the textbox (Text1) ControlSource as 'person.id' without using memory variable (like m.id) and be able to do checking on the real person table to check for duplicate ID? Would I use the '=TableUpdate' or save that '=TableUpdate' for the Save button (and '=TableRevert' for the Revert button)?

If there is no dupe ID, should I save that record (append) automatically and then enable the rest of the fields for other data entry?

If there is a dupe ID, how should I handle the error? Would other VFP error message pop up or it would be from my coding (since I am not using the Primary key anymore)? Would I be using the Valid Event?

If the above is accordingly, then if the user did not want to save the record (hits the Revert button), would the '=TableRevert' be all I need?

Lastly, as should, I also have a Delete button. I just delete the record (with a one last warning message), but not pack it. How should I handle this, with if the user types the same ID of a deleted record, should I simply pop up an error message with these words "You are about to recall a deleted record of a pervious person" and then if 'Yes', then recall that record and bring it up on the screen?

If I can not use the 'person.id' for the Text1 ControlSource, then how would I 'refresh' the m.id in the text1 to show the correct ID from the table while the user navigates the records/grid?

I may be asking for too much, but I would appreciate your help on this. I am trying to stop asking for help in the way I send the project (zipped) to you for you to look at it. If you feel insult or want to flame back, please don't reply then. Thank you.

Chuck
Today is tomorrow's yesterday.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform