From: einstein1221 on
I have a database that has a form for purchase orders. It auto-generates a
purchase order number. The user types in customer information. The form also
has a subform on it for details on parts. There is a one to many relationship
between subform and form using the purchase order number. The subform also
generates an id # as its key. The problem that I am having is when the form
is saved, the subform saves in reverse order of the way it is typed in. Where
this causes problems is in the printing of the report that serves as the
actual purchase order...It prints the reverse order. How do I either change
the order the subform fields print, or have the fields saved in order they
are typed. I am newer to coding so simplicity is appreciated. Here are the
fields I am using for subform:
potransid.......autogenerated key
po#
qty
item
cost
Thanks in advance for your help!

From: Rick Gould on
One option is to print in potransid order (key field for your PO Item
detail). Since this should be generated in the order in which it is keyed it
should come out right.

The other thing you will see in older program (much older) is an actual line
number field that defaults, pretty much the same thing but always starts with
1 for each new PO (master) and increments every time a detail record is added
for THAT PO.
EG:
PO #1000 has two detail (subform records) PODetailNum 1 and PODetailNum 2
PO #1001 has three detail records PODetailNum 1, 2 and 3

The top solution is the easier and most common solution, just using your
existing key as a sort order for the report. Hope this works for you!


"einstein1221" wrote:

> I have a database that has a form for purchase orders. It auto-generates a
> purchase order number. The user types in customer information. The form also
> has a subform on it for details on parts. There is a one to many relationship
> between subform and form using the purchase order number. The subform also
> generates an id # as its key. The problem that I am having is when the form
> is saved, the subform saves in reverse order of the way it is typed in. Where
> this causes problems is in the printing of the report that serves as the
> actual purchase order...It prints the reverse order. How do I either change
> the order the subform fields print, or have the fields saved in order they
> are typed. I am newer to coding so simplicity is appreciated. Here are the
> fields I am using for subform:
> potransid.......autogenerated key
> po#
> qty
> item
> cost
> Thanks in advance for your help!
>
> .
>
From: einstein1221 via AccessMonster.com on
I changed the sort order on the report but to nothing happened. That's when I
noticed that when the form is saved, the subform actually saves in reverse
order it is typed. In other words, the last record typed in the subform saves
with the lowest potransid.

Rick Gould wrote:
>One option is to print in potransid order (key field for your PO Item
>detail). Since this should be generated in the order in which it is keyed it
>should come out right.
>
>The other thing you will see in older program (much older) is an actual line
>number field that defaults, pretty much the same thing but always starts with
>1 for each new PO (master) and increments every time a detail record is added
>for THAT PO.
>EG:
>PO #1000 has two detail (subform records) PODetailNum 1 and PODetailNum 2
>PO #1001 has three detail records PODetailNum 1, 2 and 3
>
>The top solution is the easier and most common solution, just using your
>existing key as a sort order for the report. Hope this works for you!
>
>> I have a database that has a form for purchase orders. It auto-generates a
>> purchase order number. The user types in customer information. The form also
>[quoted text clipped - 15 lines]
>>
>> .

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1