[AccessD] Add records with sequential numbers

Lonnie Johnson prodevmg at yahoo.com
Tue Feb 24 10:18:00 CST 2004


You could append to the table using a recordset object. This way you could get your next invoice number as you usually do, then increment it as you desire inside the  vba that is doing the appending.


Gina Hoopes <hoopesg at hotmail.com> wrote: I've got an invoicing database that the end user has used to create invoices 
on an individual basis. Each time she clicks the "new invoice" button, I've 
coded the form to give her the next number in sequence. She has a specific 
range of numbers she's required to use, so it can't just be an Auto Number. 
Anyway, it's been working great, but now they want to automate the process 
so that the db automatically generates all invoices for the month after I've 
presented her with a screen to check or uncheck those that should be 
created. So, what I need help with doing is taking the temp table which 
contains those items she's checked, appending them to the Invoices table, 
and assigning them numbers in sequence. If this was a straight auto number 
situation it would be easy, but I can't figure out how to get it to work 
using her numbering system. The invoice number field is a text field 
because it contains non-numeric characters, but I've been able to get it to 
behave as a number for the individual creation purpose I described above by 
stripping the alpha characters, adding 1, then putting the alpha characters 
back in. Can someone give me an idea of how to use an append query, or 
something similar, that will allow me to automate this process?

Thanks,
Gina

_________________________________________________________________
Get fast, reliable access with MSN 9 Dial-up. Click here for Special Offer! 
http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us




 




---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.


More information about the AccessD mailing list