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  

Form needs to update two tables then ...



 
 
Thread Tools Display Modes
  #1  
Old October 19th, 2009, 02:10 PM posted to microsoft.public.access.forms
JR
external usenet poster
 
Posts: 234
Default Form needs to update two tables then ...

I have one form and two tables that I am working with.

tbl_Tasks: with an auto number key and a list of tasks

and Hours: with its own auto number key and a list of tasks that each
employee works on. The tasks that the employee works on is selected (on a
form) from tbl_Tasks -- OR -- gets added to the table by using a combo box in
a form, frm_hrs.

I need to find a way to get the form (frm_hrs) to update tbl_tasks with any
new tasks added in the combo box. I can not figure out how to make this
happen.

There does not seem to be a problem updating tbl_hrs with the information
EXCEPT that the task number (ID) for a newly entered task doesn't update
(because tbl_tasks hasn't generated a new auto-number for the new task which
hasn't been added to it).

Could use some help to make this happen.

Thanks!
  #2  
Old October 19th, 2009, 02:49 PM posted to microsoft.public.access.forms
Banana[_2_]
external usenet poster
 
Posts: 214
Default Form needs to update two tables then ...

JR wrote:
I have one form and two tables that I am working with.

tbl_Tasks: with an auto number key and a list of tasks

and Hours: with its own auto number key and a list of tasks that each
employee works on. The tasks that the employee works on is selected (on a
form) from tbl_Tasks -- OR -- gets added to the table by using a combo box in
a form, frm_hrs.

I need to find a way to get the form (frm_hrs) to update tbl_tasks with any
new tasks added in the combo box. I can not figure out how to make this
happen.

There does not seem to be a problem updating tbl_hrs with the information
EXCEPT that the task number (ID) for a newly entered task doesn't update
(because tbl_tasks hasn't generated a new auto-number for the new task which
hasn't been added to it).

Could use some help to make this happen.

Thanks!


Normally, you would do this with a form-subform, each bound to their own
table (e.g. tblTask for the form and tblHours for the subform for
instance) with the subform's link filled in to automatically filter the
records. This will be far simpler than trying to update two tables on
one form, which is theoretically possible but a PITA & time blackhole.
BTW, you can make the subform look as if it's a part of the form so the
user doesn't even know there's a subform at all on the form.
 




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 06: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.