Update Query from 2 forms (1 Viewer)

Gismo

Registered User.
Local time
Today, 09:17
Joined
Jun 12, 2017
Messages
1,298
Hi all, pls assist in a update query in 2007, I have two forms with different info and a 3rd combining it by a dropdown box, one form with info from two different tables, there is no common field between the two tables, I need to update a 3rd table. I tried using criteria from the form but it only displays a zero output. attached is a screen shot of the qry. I have added the ID field to second table from 1st table for the sake of the update qry. Capture 1.JPG , Capture.JPG
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 07:17
Joined
Jan 14, 2017
Messages
18,216
its not clear what you mean, to me anyway.

No idea what the form image is meant to show

The other image is an aggregate query, not an update query
You've included 2 tables but not linked them.
 

MarkK

bit cruncher
Local time
Yesterday, 23:17
Joined
Mar 17, 2004
Messages
8,181
I'm going to guess that you mean to implement a many-to-many relationship, wherein you have a master list of tasks, a master list of aircraft, and then you need to keep track of when a particular task is performed on a particular aircraft. The structure for that problem, if that is what you mean, is as follows...
tTask
TaskID (Primary Key)
TaskName
Description

tAircraft
AircraftID (PK)
Reg
Make
Model
Serial

tAircraftTask
AircraftTaskID (PK)
TaskID (Foreign Key)
AircraftID (FK)
TaskDate
This is a many-to-many relationship. Note that a row in tAircraftTask joins an aircraft with a task. So your task list rarely changes, your aircraft list rarely changes, and every time you perform a task on an aircraft, you add a row to tAircraftTask.

hth
Mark
 

Gismo

Registered User.
Local time
Today, 09:17
Joined
Jun 12, 2017
Messages
1,298
I can not link the 2 tables as there are no common fields, the query was changed to select qry just for testing results. One table has some tasks, the other list of aircraft. in the form I select which tasks belong to a specific aircraft, I then need to save the result in a new query. in the task table I created the ID field same as in the aircraft table to be able to have the field available to select the unbound field but does not seem to do the job
 

isladogs

MVP / VIP
Local time
Today, 07:17
Joined
Jan 14, 2017
Messages
18,216
Aircraft ID is in both tables so link using that..

Its impossible to help you with an update query from what you've shown.

Hopefully MARK's response will help but I can't assist. Sorry.
 

MarkK

bit cruncher
Local time
Yesterday, 23:17
Joined
Mar 17, 2004
Messages
8,181
I think there are two types of task.

1) One type is the task as it may exist in a catalog, like "Engine Overhaul." The abstract idea of an Engine Overhaul does not occur on a date, and does not occur in respect to a particular aircraft. It is an abstract thing, on a list, that you might want to pick from.

2) The other type of task the actual Engine Overhaul that starts next Tues and that you will perform on a a particular aircraft, and for which you will need to hire an actual mechanic.

So, if there are two types of task, and you have only one task table, then could that be a problem?

Mark
 

Gismo

Registered User.
Local time
Today, 09:17
Joined
Jun 12, 2017
Messages
1,298
let me try to explain it simpler, 1 table has my aircraft registration, second table has tasks, in my form I select the aircraft registration from dropdown linked to aircraft registration table and then I select all the tasks related to that specific aircraft, not all task relate to all aircraft. so task table does not have aircraft registration. the update query needs to take that registration and all tasks in the check box selected and save that to a new table with aircraft registration and task number. I used the update query to display only selected tasks and the registration to be bound is [Forms]![Task Select SubForm]![AircraftId] but shows no records even though the selected task does show when I remove the criteria. I don't have a common field in both tables as registration does not apply to only the tasks table. but I did add the registration field to task table to be able to use it in the query but that field in tasks will not be used in any point of time. hope this makes it a bit more clear
 

MarkK

bit cruncher
Local time
Yesterday, 23:17
Joined
Mar 17, 2004
Messages
8,181
Can you show your tables, and how they are related, as I did in post #3?
 

Users who are viewing this thread

Top Bottom