I wouldn't use autonumber as primary key in tblVehicles, tblLocation, tblType, tblStatus, tblServiceBulletins, tblLocationType, tblECMAS. I avoid lookup aliases whenever possible.
Ok, I can set the tables up differently. I just assumed that may be the easiest way.
Field name in tblWO is misspelled - EqupimentCodeMASID. It is also the wrong datatype. PK/FK fields must be same datatype. This means the Reg, EquipmentCodeMASID, LocationID, LocationTypeID, StatusID fields in tblVehicles are also wrong datatype.
So, if I keep my database as is, would I need to change the datatype to numbers?
The main form AddServiceBulletins should be unbound and cmbServiceBulletinID should also be unbound. The subform isn't even needed for this. In fact, if you want it to show the new records added be the sql action, will need to requery the form.
Ok, part of the reason I was doing the subform was so I could visually see if the changes were working.
Can do a mass append of records to tblWO with an INSERT sql action:
CurrentDb.Execute "INSERT INTO tblWO(VehicleID, ServiceBulletinID, EquipmentCodeMASID) SELECT VehicleID, " & Me.txtDescription & " As BullID, " & Me.txtEquipmentCodeMASID & " As MASID FROM tblVehicles WHERE EquipmentCodeMASID = " & Me.txtEquipmentCodeMASID
I'm not sure I follow this. What are As BullID and As MASID? Also, should ME.txtEquipmentCodeMASID be Me.cmbEquipmentCodeMASID?
Why open tblWO when AddServiceBulletins form is opened?
Not sure why I did this.
I do have a table already set up without lookup aliases. I originally set it up this way, but could not figure out how to do the mass update. So, I went a different direction. I've attached that file as well.