Auto generate INVOICE NO and STOCK ID

master_2013

Active member
Joined
Jul 8, 2013
Messages
41
Programming Experience
Beginner
Can anyone help me to Auto generate INVOICE NO and STOCK ID in VB.NET using data binding with MS ACCESS DB
i want the invoice number as "000001" to display & stored in database and STOCK ID AS "NEU-001" display and store in database must be auto generated please help me.
 
Hi,

For each of the Tables in your Database you can set the Invoice_No and Stock_ID Fields in your tables to an AutoNumber and then use the Format property to change how the Data is displayed. In the case of your Invoice_No this would be 000000 and in the case of your Stock_ID this would be "NEU-"000.

The thing to remember when using the Format property of the AutoNumber in Access is that the underlying Data Type is still stored as a Long Integer even though it displays correctly when you view the Table Records in Access. Due to this, when you bring your information into VS you will need to re-apply the same formatting to display the information you want correctly in whichever controls you use.

Hope that helps.

Cheers,

Ian
 
Back
Top