First of all, I found another thread here: https://www.accessforums.net/forms/c...key-38617.html, which has a very similar problem to mine. I tried to modify that solution to fit my situation, but I have been unsuccessful.
Some background information:
I work in a library, and I keep track of serials (magazines and journals) using an Access database that I built. I recently switched from a single primary key to a composite key. Serials all have identifying numbers (ISSNs) given to them by a particular organization. I import data from many different publishers, all of which include ISSNs, so it makes the most sense to use ISSNs as my primary key. The problem is that some serials have the same ISSN because of title changes, and some serials don't have any ISSN at all. Originally, I was using a primary key and adding a random letter to the ISSN to make the two entries different. In an effort to retain the integrity of the ISSN primary key, I decided to make a composite key, so that I could have a second field that allows me to have several records with the same ISSN number. This is very necessary, and for the most part, it is working beautifully.
The problem is that the buttons on our forms don't work anymore. I can't figure out how to base an open form button on a composite key. I have tried the solutions in the thread linked above, and a solution in another thread in another forum. The solutions are all similar, and I've tried various versions of all of them. Nothing works. I have a lot of Access experience--but in the GUI way. If I can avoid writing expressions and using SQL, I do. However, if you give me code, I can usually figure out how to use it.
Please use these field names so that I can tell what goes where:
For the form with the button: [Table1].[Primary Key1], [Table1].[Secondary Key1]
For the form the button opens: [Table2].[Primary Key2], [Table2].[Secondary Key2]
If there's anything in your code that is supposed to be replaced with a unique name from my database, please let me know.
Thanks for any help.