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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 |
#3
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|