A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

subform problems



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2010, 04:58 PM posted to microsoft.public.access.forms
einstein1221
external usenet poster
 
Posts: 1
Default subform problems

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!

  #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!

.

  #3  
Old May 6th, 2010, 04:47 PM posted to microsoft.public.access.forms
einstein1221 via AccessMonster.com
external usenet poster
 
Posts: 1
Default subform problems

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/For...forms/201005/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.