Racking my brains here on this one.
I have a main form with a continuous form as a sub form. The main form displays the current record while the continuous sub form displays all of the users in the table, which is what I want. Both are bound to the same table - UserGroupT. I would like to be able to double-click a user on the sub form and make that record current on the main form. I have created the double-click event with the following code:
DoCmd.GoToRecord acDataForm, "MainForm", acGoTo, x (where x is the PK of the user's record in UserGroupT)
But it throws error 2105 "you can't go to the specified record"
I have verified that the double-click event gets the correct value for x from the sub form. Even if I replace x with a valid number of the PK in the UserGroupT, it still throws the same error. I've also placed a temporary command button on the main form with a valid PK number and it throws the same error.
What am I missing here or maybe I should use another method to change the main form's current record?