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  

Appending a table from a form



 
 
Thread Tools Display Modes
  #1  
Old October 23rd, 2006, 03:35 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 22
Default Appending a table from a form

Hi Guys,
I have an annoying problem and I hope you can help.
I have a db with two tables. There is a one-to-many relationship
between them with the one field being a PK autonumber on the primary
table.
I would like to create a form from the primary table with a command
button which automatically appends or creates an entry the linking
field in the 2nd many table.
i.e. If I start entering data in the primary form, the PK autonumber is
generated. Then I want to click a button which;
(a) creates an entry on the 2nd table with the same number which is the
PK of the primary
(b) opens a new form for the 2nd table showing the record with that
number. I know how to do this
(c) close the primary table. I know how to do this.

So, I would open up the primary table and start entering data. The PK
for that record would then automatically be generated. When I'm done, I
would like to click a button which takes me to the 2nd "many" form,
where I can enter data and have it automatically linked to primary
record.

There would then be another button on the 2nd table which would create
a new record with the same ID again. Thus, a one-to-many relationship

I know I can do something similar with a sub form, but I would like to
use this technique to create a cascade of forms as I have so much info
to put in it wouldn't fit on the 55" of the standard form.

Thanks in advance.
Tony

  #2  
Old October 23rd, 2006, 03:51 PM posted to microsoft.public.access.forms
kingston via AccessMonster.com
external usenet poster
 
Posts: 620
Default Appending a table from a form

If I understand correctly, you can use a subform that has the data grouped
via tabs. If you have a lot of fields in the subform, you might consider
using the datasheet view too. Using subforms seems to be the correct
approach. It just sounds like you need to settle on a way to display the
subform.

wrote:
Hi Guys,
I have an annoying problem and I hope you can help.
I have a db with two tables. There is a one-to-many relationship
between them with the one field being a PK autonumber on the primary
table.
I would like to create a form from the primary table with a command
button which automatically appends or creates an entry the linking
field in the 2nd many table.
i.e. If I start entering data in the primary form, the PK autonumber is
generated. Then I want to click a button which;
(a) creates an entry on the 2nd table with the same number which is the
PK of the primary
(b) opens a new form for the 2nd table showing the record with that
number. I know how to do this
(c) close the primary table. I know how to do this.

So, I would open up the primary table and start entering data. The PK
for that record would then automatically be generated. When I'm done, I
would like to click a button which takes me to the 2nd "many" form,
where I can enter data and have it automatically linked to primary
record.

There would then be another button on the 2nd table which would create
a new record with the same ID again. Thus, a one-to-many relationship

I know I can do something similar with a sub form, but I would like to
use this technique to create a cascade of forms as I have so much info
to put in it wouldn't fit on the 55" of the standard form.

Thanks in advance.
Tony


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200610/1

  #3  
Old October 23rd, 2006, 04:12 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 22
Default Appending a table from a form

I know I can use sub-forms. It's just that I don't particularly want to
use them. I would prefer a cascade of forms. i.e. fill out first form,
hit next to go to the next part..and so on.
I was thinking if I could get the append query to work, then I'd be in
business.

Playing around, another issue with it is that it adds multiple records
when I only want to add one as it gets the info from the table and not
the form.

  #4  
Old October 23rd, 2006, 04:25 PM posted to microsoft.public.access.forms
kingston via AccessMonster.com
external usenet poster
 
Posts: 620
Default Appending a table from a form

I still think that you can use subforms and a tab control to do exactly what
you're describing. Each tab would hold some of the fields and you can create
a button to go to the next tab if you want.

Records generally are created one at a time in a subform. It's not clear why
you get multiple records. I suggest you test the different display options
for the subform: single, continuous, and datasheet.

wrote:
I know I can use sub-forms. It's just that I don't particularly want to
use them. I would prefer a cascade of forms. i.e. fill out first form,
hit next to go to the next part..and so on.
I was thinking if I could get the append query to work, then I'd be in
business.

Playing around, another issue with it is that it adds multiple records
when I only want to add one as it gets the info from the table and not
the form.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200610/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:25 AM.


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