>>>I have an incremental number generator (primary key) that I use for a P.O. number. I'm using Optimistic Buffering. The problem is that when I simply exit without saving and enter again, it increments again. The buffer doesn't clear until I close foxpro. what command can i use in the exit click event that will CLEAR THE BUFFER?
>>
>>Don't get the PO number until you actually save. Problem solved.
>
>I will be on the phone with customers and will need this number to give them. How do you suggest I get the number? I'd like it to show up on the form before I save, but if you have a better way, I'm all ears.
Jimmy,
I wouldn't do it this way. By waiting to save before you get the number, they will be sequential. This is normally the way things are done. I get it all the time when I order stuff over the phone or web or call for technical support. Once you save the header, you'll be able to get the invoice number. Save the details, then display the number IF everything saves.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer