I have created a simple invoice data base as below :
Table1 : main form
INV_NO : auto number, primary key
DATA : date/time
CUSTOMER_NAME : text
CASH/CHECK : text
Table2 : sub form
INV_NO : number
LINE_NO : number
DESCRIPTION : TEXT
UNIT_PRICE : number
AMOUNT : number
I have hided INV_NO field in the subform.
I created one form with both table1 and table2 as main form and sub form.
I want auto number in LINE_NO field. In case I make this field as auto I
get new line number. But this number is getting depends on every invoice
number. Let me tell you this way for example: Once I input 3 records in
invoice 1 I get first line in invoice 2 as four. I don’t want this way. In
invoice 1 I need 1,2,3,4,5………so on as serial number. This way once I start
new invoice I need line number of description in 1,2,3,4,5…. so on. I hope
you got what I mean.
--------------------------------------------------------------------