Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Making sure only one value is set in table
Versions des environnements
Network:
Windows 2003 Server
OK, I don't know wether it is the holidays, and I shouldn't be working but...
I have a company table with branches in it. I have a field that states which branch is the primary... ie, it allows for each branch to be set as their own primary for information that is not shared to be accessed only by them. So I set up a sitedefa field, with a value of .T. if this is the primary branch.
Out of the seven sites, there can only be one primary, ie one record where sitedefa field is .T.
How do I ensure, if a user tries to chnage another site to be the default one, that
1. I let them know they are trying to do this.
2. Ask them to confirm it, if they do.
3. Do if they do want to, otherwise revert this field.
I wrote some code in the vlaid event of the defasite field on the form, however, it pops up with the error that the record is in use by another, when I am the only person using it.
Is there a simple way to get around this issue? I tried curval, oldval method, I tried buffering the value on start, etc.
Still get the annoying error above.
TIA,
Mike
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement