My Microsoft Access 2013 DB contains three main tables: A primary Suppliers table, a Products table, and a slave table to the products if a product is a matrix (multiple variations, like colours) instead of a single standalone product.
I have already created a rather nice interface with Access 2013 using this tutorial: https://www.youtube.com/watch?v=4ei0PFrDUa0 to create a drop-down populated from the Suppliers to limit the products displayed as being from that supplier. I have also been able to create a link within the embedded products datasheet (https://www.youtube.com/watch?v=GopSdt4QNck) to launch for any one product a form to edit that product (a link instead of a button because datasheets cannot contain buttons).
My difficulty now is that I want to put beneath the embedded products form a button that not only launches a blank form for adding a new product, but also to pre-populate the foreign key of the product with the ID of the supplier from the drop-down menu.
So keep in mind I now have three forms, and I want to add a fourth. One form is the overall “Suppliers” form which contains a drop-down. That drop-down modifies an embedded form within it (“Products Display”) to show only those products that are for that supplier selected from the drop-down. The embedded form has got rows that show only the two most important pieces of information about the product (the code we use in-house to identify it, and its name) and a link. This link is tied to that product and launches a “Product Edit” form that pre-populates the form with that specific product for editing (and has all the details from that table).
So those are the three forms. I want to now add a button to the first form (the one with the drop-down) that launches a “Product Create” form similar to the “Product Edit” form, but only with the essential fields, and with the foreign key (the Supplier ID) pre-filled to the last supplier selected in the drop-down before the button was clicked. This means that the button must dynamically change every time the drop-down is used.
Problem is, I haven’t the foggiest notion how to do this within Access 2013. Using a standard button with the wizard does allow me to spawn a new “Product Create” form, but there is no way to pre-populate the foreign key using just the wizard itself. Plus, I do not know how to have the button auto-modify each and every time the drop-down is used.