M
Melanie H.
Hello everyone! I need some help with a piece of code I will be using for an
Estimate/Proposal database. This form will feed a table storing:
ID, Estimate No, Line, Quantity, Product, Price
The industry that my employer works in often must supply proposals via
divisions. So, that means that our proposal must show products grouped into
sections. This is fine on original proposals, but on our revisions, we may
have to go back and insert lines for additional products the customer may
request, or do extra breakdowns. In order to achieve my goal, I will need
Arrow Up and Arrow Down buttons attached to macros which will change the sort
order. I have seen other databases with this functionality, but I have not
clue #1 what the code would look like.
This is a two part question.
#1 Need Help Establishing the Code to Automatically Generate Sort Order
Numbers
This "Products Page" will be a subform, tied back the main form via the
Estimate No. ID, Estimate No and Line will be hidden fields, visibility
turned off. So, I need the code that would automatically set the first line
for that estimate at "1" and advance the number by one each time a product is
listed or a blank line is inserted.
************************************************************
Example:
Line Qty Product
Amt
1 5 3'0" x 7'0" Hollow Metal Detention Doors $0,000.00
2 8 3'6" x 7'0" Hollow Metal Detention Doors $0,000.00
3 (Blank)
4 5 3'0" x 7'0" Hollow Metal Detention Frames $0,000.00
5 8 3'6" x 7'0" Hollow Metal Detention Frames $0,000.00
************************************************************
This code must also be aware of the Estimate No. I want the number to reset
itself to zero when a new estimate is started, but if I go back and add in
lines on previous estimates I want it to detect what the last line number was
and add 1 number to that.
#2 I will also need help with the code linking the Two Command (Arrow
Buttons) to an event procedure. When I depress the up button it re-numbers
the items from the record preceding down and re-sorts the column to give the
appearance so that the record has moved up one line. Of course with the down
button it would re-number the items from the current line down and re-sort.
***********************************************************
Woops! Now there is a revision and the customer wants another size door
quoted.
Line Qty Product
Amt
3 2 3'10" x 7'0" Hollow Metal Detention Doors $0,000.00
Line 3 must become line 4, line 4 must become line 5 and so on and so forth.
***********************************************************
Can anyone help me? I know this is a lot, but any help is much appreciated.
Melanie
Estimate/Proposal database. This form will feed a table storing:
ID, Estimate No, Line, Quantity, Product, Price
The industry that my employer works in often must supply proposals via
divisions. So, that means that our proposal must show products grouped into
sections. This is fine on original proposals, but on our revisions, we may
have to go back and insert lines for additional products the customer may
request, or do extra breakdowns. In order to achieve my goal, I will need
Arrow Up and Arrow Down buttons attached to macros which will change the sort
order. I have seen other databases with this functionality, but I have not
clue #1 what the code would look like.
This is a two part question.
#1 Need Help Establishing the Code to Automatically Generate Sort Order
Numbers
This "Products Page" will be a subform, tied back the main form via the
Estimate No. ID, Estimate No and Line will be hidden fields, visibility
turned off. So, I need the code that would automatically set the first line
for that estimate at "1" and advance the number by one each time a product is
listed or a blank line is inserted.
************************************************************
Example:
Line Qty Product
Amt
1 5 3'0" x 7'0" Hollow Metal Detention Doors $0,000.00
2 8 3'6" x 7'0" Hollow Metal Detention Doors $0,000.00
3 (Blank)
4 5 3'0" x 7'0" Hollow Metal Detention Frames $0,000.00
5 8 3'6" x 7'0" Hollow Metal Detention Frames $0,000.00
************************************************************
This code must also be aware of the Estimate No. I want the number to reset
itself to zero when a new estimate is started, but if I go back and add in
lines on previous estimates I want it to detect what the last line number was
and add 1 number to that.
#2 I will also need help with the code linking the Two Command (Arrow
Buttons) to an event procedure. When I depress the up button it re-numbers
the items from the record preceding down and re-sorts the column to give the
appearance so that the record has moved up one line. Of course with the down
button it would re-number the items from the current line down and re-sort.
***********************************************************
Woops! Now there is a revision and the customer wants another size door
quoted.
Line Qty Product
Amt
3 2 3'10" x 7'0" Hollow Metal Detention Doors $0,000.00
Line 3 must become line 4, line 4 must become line 5 and so on and so forth.
***********************************************************
Can anyone help me? I know this is a lot, but any help is much appreciated.
Melanie