It should look for the ID I am already workign on. So if with the first button "Go to record" I managed to go to record 3, nw when I click "go to form 2" I want it to go to the form 2 for record 3.
I wasn't expecting an answer from you That was just food for thought!
The WHERE part of the OpenForm method is like entering criteria in a query. So if you have a field called ID and I want to go to the record with an ID of 3, I would enter 3 under the criteria right? This translates to "ID = 3" isn't that right?
First of all try entering the ID number in manually in the OpenForm where clause as explained above. Then it would all be clear. I would advise you re-read the information in the link again.
The WHERE part of the OpenForm method is like entering criteria in a query. So if you have a field called ID and I want to go to the record with an ID of 3, I would enter 3 under the criteria right? This translates to "ID = 3" isn't that right?
Thank you very much for all your support but I am confused: you mean this
DoCmd.OpenForm "cazzola_2", , , "EER = '" & Me.ControlName & " # "
So basically I am know in cazzola_1 form and I want now to go to cazzola_2 and the record I want open the cazzola_2 form for is contained in the field EER
I cannot manage to get the meaning of Me.controlname...
Me is referring to the form you're writing the code in. So if you're writing code in a form called Form20 instead of writing "Forms!Form20" to refer to the form, you can use "Me".
I thought you would have understood my explanation and the link that was sent. I don't know of any other way to explain it to you. Maybe seeing this code will:
Code:
DoCmd.OpenForm "cazzola_2", , , "EER = 3"
cazzola_2 - the form you want to open
EER - the name of the ID field that uniquely identifies a record
3 - the record that has an with the number 3
"EER = 3" - find the record where EER (my ID field) is equal to 3.