I have a mainform (form1, with its own table), which has an autonumber field named ID. On form1, i have a button to open form2, that i need the ID number on, but it has its own ID field(not just reusing the same field). I have defined the relationships for the tables with the ID number, but i am not sure how to make the ID from table 1 to automatically load in table 2. I assume that it will use code on the onload of table 2, but i am kinda lost on the code. I tried this with onLoad but i am sure that you can tell why it doesn't work (although I cant :)
me![id] = id_table1
I understand that this doesnt actually tell it from where to get the id_table1
the button on form1 has this
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "mat_cert_form"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Since all of my forms (quite a few, each with different tables) will progressivly use the same number but saved for each table, this will help me out on alot of forms. Sometimes i know what i mean to say, but i dont quite communicate it very well. If you need to understand more about my problem, just ask. I am not very good with this, but i am getting smarter everyday (thanks to a bunch of you)