Single form update two tables

J

JDBishop

I have a Equipment form that is bound to the tbEquipment.lngPO, the lngPO is
linked to the tbPO.lngPO, tbPO.strPO. I am trying an NotInList event but it
fails. Can anyone give me some insight on this. I am new to Access and don't
know alot.
 
K

Klatuu

A form is not bound to a specific field, it is bound to either a table or a
query. Controls on the form are bound to the fields.
What is the name of the table the form is bound to?
What is the name of the other table you want to update?
Does this form have a sub form?
If so, what is the record source for the sub form?
 
J

JDBishop via AccessMonster.com

Thank you for your reply;
The form is frmEquipment bound to tbEquipment with a subform frmMaintenance
Data Source tbEquipment, the frmMaintenance has a subform of frmMaintenance
subform with a Data Source of tbMaintenace. The two tables i need to update
are tbEquipment with the lngPO number that comes from the table tbPO after
the strPO number is entered into the table.
I hope this has not confused you as much as it has me. I am not sure how to
explain but will try my best. Thanks
 
K

Klatuu

Okay, this PO number comes from the table tbPO, but how do know the PO number
to look up? Do you enter into the form or the subform, or are you expecting
it to autopopulate?
 
J

JDBishop via AccessMonster.com

I have a dropdown box on the Equipment form when a new equipment comes in
check to see if the PO already exist and if it dosen't then I enter the PO
into tbPO.strPO field use the dropdown box and select that PO number wich
puts the lngPO from tbPO.lngPO into the equipmetn table. What I would like to
do is a NotInList and add the PO number in the dropdown box let it add the PO
number to tbPO.strPO field and update tbEquipment.lngPO field automagic.
Okay, this PO number comes from the table tbPO, but how do know the PO number
to look up? Do you enter into the form or the subform, or are you expecting
it to autopopulate?
Thank you for your reply;
The form is frmEquipment bound to tbEquipment with a subform frmMaintenance
[quoted text clipped - 16 lines]
 
K

Klatuu

Are you wanting to open the form you use to enter a new PO? You can do that
in the Not In List event. Once you have created the new PO and closed that
form, then you need to requery the combo and it will now be in the list.

JDBishop via AccessMonster.com said:
I have a dropdown box on the Equipment form when a new equipment comes in
check to see if the PO already exist and if it dosen't then I enter the PO
into tbPO.strPO field use the dropdown box and select that PO number wich
puts the lngPO from tbPO.lngPO into the equipmetn table. What I would like to
do is a NotInList and add the PO number in the dropdown box let it add the PO
number to tbPO.strPO field and update tbEquipment.lngPO field automagic.
Okay, this PO number comes from the table tbPO, but how do know the PO number
to look up? Do you enter into the form or the subform, or are you expecting
it to autopopulate?
Thank you for your reply;
The form is frmEquipment bound to tbEquipment with a subform frmMaintenance
[quoted text clipped - 16 lines]
fails. Can anyone give me some insight on this. I am new to Access and don't
know alot.
 
Top