cyberpac9
Registered User.
- Local time
- Yesterday, 21:27
- Joined
- Jun 6, 2005
- Messages
- 70
i have a form whose record source is a query...the problem i am running into updating the form once a record has been selected...the fields that give me issues relate to fields who utilize combo boxes...i'll give more detail here, using a condensed version of my form:
so, the query above uses 3 tables...the main table (tbl_fire_alarm) has all the info i need...the other two tables, tbl_list_building and tbl_fire_alarm_rec, provide the data for the combo boxes...for example, the primary key in tbl_fire_alarm_rec has a foreign key in tbl_fire_alarm.
so in my form i represent the data for the field tbl_fire_alarm.rcvd_from_id in a combo box, thus displaying the data from tbl_alarm_rec.
now the problem is when i change the value in the combo box on the form, it doesn't update the value tbl_fire_alarm.rcvd_from_id but updates tbl_alarm_rec instead.
for example, if the value in tbl_fire_alarm.rcvd_from_id = 1 (where the value 1 in tbl_alarm_rec shows 911 as the source of the alarm) and i change it to a value of 2 (where the value of 2 in tbl_alarm_rec shows Delta as the source of the alarm), the value is not updated in tbl_fire_alarm (it's still tbl_fire_alarm.rcvd_from_id = 1) but it changes in tbl_alarm_rec...where id = 1 it is 911 and now id=2 is 911 as well...
does that make sense? that is really long, and i know it is simple it's just too early and i can't get it to work right now...thanks for any help...
Code:
SELECT dbo.tbl_fire_alarm.fire_id, dbo.tbl_fire_alarm.building_id, dbo.tbl_fire_alarm.room_no, dbo.tbl_fire_alarm.date_rcvd, dbo.tbl_fire_alarm.time_rcvd, dbo.tbl_fire_alarm_rec.alarm_rec, dbo.tbl_list_building.building_desc, dbo.tbl_fire_alarm.bldgother, dbo.tbl_fire_alarm.rcvd_from_id
FROM dbo.tbl_list_building INNER JOIN dbo.tbl_fire_alarm_rec INNER JOIN dbo.tbl_fire_alarm ON dbo.tbl_fire_alarm_rec.alarm_rec_id = dbo.tbl_fire_alarm.rcvd_from_id ON dbo.tbl_list_building.building_id = dbo.tbl_fire_alarm.building_id
WHERE (dbo.tbl_fire_alarm.building_id = @Building_No)
so in my form i represent the data for the field tbl_fire_alarm.rcvd_from_id in a combo box, thus displaying the data from tbl_alarm_rec.
now the problem is when i change the value in the combo box on the form, it doesn't update the value tbl_fire_alarm.rcvd_from_id but updates tbl_alarm_rec instead.
for example, if the value in tbl_fire_alarm.rcvd_from_id = 1 (where the value 1 in tbl_alarm_rec shows 911 as the source of the alarm) and i change it to a value of 2 (where the value of 2 in tbl_alarm_rec shows Delta as the source of the alarm), the value is not updated in tbl_fire_alarm (it's still tbl_fire_alarm.rcvd_from_id = 1) but it changes in tbl_alarm_rec...where id = 1 it is 911 and now id=2 is 911 as well...
does that make sense? that is really long, and i know it is simple it's just too early and i can't get it to work right now...thanks for any help...