See Last Number 
Author Message
 See Last Number

Hi
I have a database which is a record of quotes sent.
I would like to display the previous quote number when I open up a new form
to enter the details of a new quote.
Or failing that can I make the Quote number into some kind of Auotnumber
function??

Regards
Dave



Sat, 24 Jan 2004 23:01:18 GMT  
 See Last Number
In the Form_BeforeUpdate event procedure, after any record
validtion code you might have, add:
    If Me.NewRecord Then
        Me.QuoteID = Nz(DMax("QuoteID", "QuoteTable"),0) + 1
    End If

If this is a multi-user environment, that's still not bulletproof.

Quote:

> I have a database which is a record of quotes sent.
> I would like to display the previous quote number when I open
> up a new form to enter the details of a new quote.
> Or failing that can I make the Quote number into some kind of
> Auotnumber function??

--
Perth, Western Australia
Tips for MS Access users at:
        http://odyssey.apana.org.au/~abrowne


Sun, 25 Jan 2004 11:41:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Autonumbering by looking at the last number in the table

2. How do we access the last dialed number from a VBA Routine

3. Wrong week number for last monday

4. Rich Edit - detect number of last line?

5. Get last page number failed with .Net

6. Identifying the last paragraph mark or last break on a page

7. Change the Last Modify and Last Access date

8. Compare last 7 days to last calendar week V8.5

9. "Delete unused styles" - macro, last seen around 1998

10. Some weird run time error I've never seen before

11. Some wierd error I've never seen before

12. Keep users from seeing Database window or using F11

 

 
Powered by phpBB® Forum Software