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
|
|||
|
|||
Update Multiple Fields
Greetings all,
I have a table called tblAircraft and it contains the following fields (this is more of a Lookup table) TailNumber AircraftType I have another table called tblHoursFlown the fields in this table a PilotID flyDate TailNumber AircraftType HoursFlown I have a form built for tblHoursFlown and what I am trying to do is, when I select the Tailnumber from a Drop down box that uses the tblAircraft TailNumber as its source, I would like it to populate the Aircraft Type with the corresponding Aircraft Type located in the tblAircraft table. Example tblAircraft TailNumber AircraftType 1234 UH-60 2345 UH-60 3456 AH-64 When I am filling in the form (based off of tblHoursFlown), and I select 1234 as the TailNumber, I would like the Aircraft Type to put UH-60 in Aircraft Type field on the form. Not sure how to reference or where to reference it at. Any assistance would be appreciated. -- Wally Steadman US Army in Iraq |
#2
|
|||
|
|||
Walter Steadman wrote:
Greetings all, I have a table called tblAircraft and it contains the following fields (this is more of a Lookup table) TailNumber AircraftType I have another table called tblHoursFlown the fields in this table a PilotID flyDate TailNumber AircraftType HoursFlown I have a form built for tblHoursFlown and what I am trying to do is, when I select the Tailnumber from a Drop down box that uses the tblAircraft TailNumber as its source, I would like it to populate the Aircraft Type with the corresponding Aircraft Type located in the tblAircraft table. Example tblAircraft TailNumber AircraftType 1234 UH-60 2345 UH-60 3456 AH-64 When I am filling in the form (based off of tblHoursFlown), and I select 1234 as the TailNumber, I would like the Aircraft Type to put UH-60 in Aircraft Type field on the form. Not sure how to reference or where to reference it at. Any assistance would be appreciated. It's best to not do this. Eliminate AircraftType from tblHoursFlown and build a relation between that table and tblAircraft. Use a query based on that relationship to display the information. While it's not a big deal here, if you used this approach to fill the pirates (funny only if you like Gilbert and Sullivan) last name and the last name changed you would have a lot of work to do. The Northwind database has examples of this. |
#3
|
|||
|
|||
Mike,
Thanks for the assist. I totally got what you were saying and it works great. Appreciate it Wally "Mike Painter" wrote in message ... Walter Steadman wrote: Greetings all, I have a table called tblAircraft and it contains the following fields (this is more of a Lookup table) TailNumber AircraftType I have another table called tblHoursFlown the fields in this table a PilotID flyDate TailNumber AircraftType HoursFlown I have a form built for tblHoursFlown and what I am trying to do is, when I select the Tailnumber from a Drop down box that uses the tblAircraft TailNumber as its source, I would like it to populate the Aircraft Type with the corresponding Aircraft Type located in the tblAircraft table. Example tblAircraft TailNumber AircraftType 1234 UH-60 2345 UH-60 3456 AH-64 When I am filling in the form (based off of tblHoursFlown), and I select 1234 as the TailNumber, I would like the Aircraft Type to put UH-60 in Aircraft Type field on the form. Not sure how to reference or where to reference it at. Any assistance would be appreciated. It's best to not do this. Eliminate AircraftType from tblHoursFlown and build a relation between that table and tblAircraft. Use a query based on that relationship to display the information. While it's not a big deal here, if you used this approach to fill the pirates (funny only if you like Gilbert and Sullivan) last name and the last name changed you would have a lot of work to do. The Northwind database has examples of this. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to update sevral fields using a Main/Subform design | skeetermouse | Using Forms | 0 | June 9th, 2005 08:18 PM |
Installing cumulative update for OE 6 | Vasilis | Outlook Express | 8 | May 7th, 2005 02:01 AM |
Update Query - daily update of 31 fields (each day of month) | Frank F. | Running & Setting Up Queries | 2 | December 15th, 2004 01:25 AM |
update fields in a form / subform ??? | peter junker | Running & Setting Up Queries | 0 | December 5th, 2004 11:15 AM |
ComboBox fields to Update record in a table | LMB | New Users | 6 | September 20th, 2004 09:27 PM |