Header Table and Line Table - Auto-increment feild

arindamarindam Member Posts: 176
Hi All,

I am developing a simple form and badly got stuck on one point. I'll be thankful to you if you can help me out.

Senario :
I have two tables (header and line). I have 1 master form which holds all the header table's feild. I include a subform which hold the other tabular form which is populated from line table. Now there I have 1 Serial Number feild, which I need to increment depends on the header data. For example -
Header id :=1, Name := xx, Address :=yy (Header table)
Line id :=1 ( needs to increment/ auto generated), item : item1, Price :999, header id := 1(line table)
Line id :=2 ( needs to increment/ auto generated), item : item1, Price :999,header id := 1(line table)

Header id :=2, Name := kk, Address :=ee(Header table)
Line id :=1 ( needs to increment/ auto generated), item : item5, Price :999, header id := 2(line table)
Line id :=2 ( needs to increment/ auto generated), item : item6, Price :999,header id := 2(line table)

My objective is, I need to increment the Line id feild of the grid depending on the header. That feild is non editable.

I hope I am able to express my requirement.

Please help.

Regards,
Arindam

Comments

  • Simo_baSimo_ba Member Posts: 78
    hi
    1.you have to create a PK in the detail table witch end with numeric field.like IDHeader,LineNo ok
    2.on the form subform in your case. make"AutoSplitKey" to yes
    good luck.
Sign In or Register to comment.