Victor, > > Im not sure what you mean by concurrent selects. The first select happen > before you enter the form then you do a bunch of stuff and then you close > the form. The whole thing would be something like this.
If you go some lines down to LABEL DONE, ... > > --YourFileName.RMD > --SET YOU VARS > SET VAR vWhatEver INTEGER = NULL > > SELECT (MAX(PONumber)+1) INTO vPONumber INDIC ivPONumber FROM POHeader > > INSERT INTO tPOHeader + > (PONumber,PODate,POTime,POVendorID) + > Values + > (.vPONumber,.#DATE,.#TIME,.vVendorID) > > EDIT USING YOURFORM NAME > > --Do Some Stuff > > IF vButton = 99 THEN > GOTO DONE > ENDIF > > LABEL DONE > --CHECK TO SEE IF NUMBER IS STILL GOOD > SELECT (MAX(PONumber)+1) INTO vPONumber2 INDIC ivPONumber2 FROM POHeader ... you can see that if 2 users pass this line of code for about the same time,... > IF vPoNumber2 = vPoNumber then > APPEND tPoHeader TO PoHeader .. they will enter the same PoNumber. (for simplicity guess no one else enters PONumbers and that they have select the same MAX(PONumber + 1) at the beginning) So you need to use NEXT function or UPDATE command in the way others have already demonstrated. > ELSE > UPDATE tPoHeader SET PoNumber = .vPoNumber2 > APPEND tPoHeader TO PoHeader > ENDIF > > > On your form you have a close button with a eep that reads > -- Button.EEP > -- RAZZAK > CLS > SAVEROW > SET VAR vButton = .%1 > CLOSEWINDOW > RETURN > > and you fire of this eep like this > Button.EEP USING 99 > > I think Dennis has a good idea. > > I hope that helps. If not well I gave it a try. Have a good one > Polychronis --- RBASE-L ================================================ TO POST A MESSAGE TO ALL MEMBERS: Send a plain text email to [EMAIL PROTECTED] (Don't use any of these words as your Subject: INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH, REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP) ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message SUBJECT, put just one word: INTRO ================================================ TO UNSUBSCRIBE: Send a plain text email to [EMAIL PROTECTED] In the message SUBJECT, put just one word: UNSUBSCRIBE ================================================ TO SEARCH ARCHIVES: Send a plain text email to [EMAIL PROTECTED] In the message SUBJECT, put just one word: SEARCH-n (where n is the number of days). In the message body, place any text to search for. ================================================

