View Single Post
  #2  
Old May 5th, 2010, 06:09 AM posted to microsoft.public.access.forms
Rick Gould
external usenet poster
 
Posts: 2
Default subform problems

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!

.