J
jtidwell
All my relationships in my database are one to many.
The table consists of 9 fields, one of them being my "contract number" field
and it has a drop down
box. The other fields are prices. I have it set up in my form when I click
on "contract number" the company name and all the related prices and
calculations come up for that specific "contract number". The only thing I
can not figure out is how to generate a sequential work order number to
relate to EACH different contract number.
For Example if I click on "contract numbers" and I choose A0009041P (which
all contract numbers have the same format but different last letters) then a
work order number should appear, if P100039 was the last work order number
then P100040 should appear.
This is my layout.
tblcompanies
PK - CompanyID
- tblcontractlist
PK - Contract Numbers (this is where my combo box is located)
- Company ID
tblMaintWO
PK - MaintWorkorderID
- Contract Numbers
Right now I have one form (FrmMaintWO).
I want to select a contract number from the combo box. This should
automatically bring up a new work order number for that specific contract
number
Also, I would like to see the Work Order Numbers stored in a Combo So I
will see the Work Orders that have already been entered
The table consists of 9 fields, one of them being my "contract number" field
and it has a drop down
box. The other fields are prices. I have it set up in my form when I click
on "contract number" the company name and all the related prices and
calculations come up for that specific "contract number". The only thing I
can not figure out is how to generate a sequential work order number to
relate to EACH different contract number.
For Example if I click on "contract numbers" and I choose A0009041P (which
all contract numbers have the same format but different last letters) then a
work order number should appear, if P100039 was the last work order number
then P100040 should appear.
This is my layout.
tblcompanies
PK - CompanyID
- tblcontractlist
PK - Contract Numbers (this is where my combo box is located)
- Company ID
tblMaintWO
PK - MaintWorkorderID
- Contract Numbers
Right now I have one form (FrmMaintWO).
I want to select a contract number from the combo box. This should
automatically bring up a new work order number for that specific contract
number
Also, I would like to see the Work Order Numbers stored in a Combo So I
will see the Work Orders that have already been entered