Unanswered: Copy fields into data entry form from secondary table
I apologize if this has ever been covered here but I have searched extensively online and cannot find a solution for exactly what I am looking to do.
Version: Access 2007
Problem:I would like to have the option to manually input fields in a form (current process) or populate those fields via button. Data would come from a secondary table within same database where the primary key for that secondary table is selected already into a lookup field in the form.
Scenario: Form 1 is a -current record-data entry- form that works perfectly but I want to now add some user friendliness and efficiency to it. The form is for record entry into my tbl_projects. Tbl_Projects has a primary key [Service#]
I have a table tbl_Warehouses that stores locations of warehouses that provide services for us.
Back to the form…In the first section of the form we identify the warehouse that is providing the services via a combo box-lookup field to [WHCode] in tbl_Warehouses
I have the fields for the origination address in Form1 which are [OriginName], [OriginStreet], [OriginCity], [OriginState], [OriginZip], [OriginContact] and [OriginPhone]. As you can see each one has a corresponding field in tbl_Warehouses.
Currently these have to be manually updated which has to remain an option as sometimes they require a manual address. However other times the Origination address is the Warehouse address that is stored in tbl_Warehouses.
What I want to do is put a button in the Origination Address section that will ‘on click’ look at the [WHCode] that was selected in section 1 of the form and copy the address fields from the tbl_Warehouses to the fields in Form1/tbl_Projects for the Origin address.
I hope I have explained this well enough for advice or even a point in the right direction.