title: Access Form switches unintentionally between Datasets
body: <p>I am rather new to coding an Access Application and I have a rather strange error I do not seem to be able to resolve.</p>
  <p>I have multiple Forms which are used to write data to some tables. Basically one Form per table.</p>
  <p>Mostly the forms are just used to show a selection of the data in the tables. To make sure that noone accidentally alters some data you have to press the button &quot;alter&quot; first, which unlocks the fields to alter the dataset. In one form, however, when you ppress the alter button it switches the dataset. I have one column which is an automated ID which serves as a primary key to distinguish the data from one another.
  So when I am debugging the issue and print this ID (<code>Debug.Print Forms(formName).Controls(&quot;ID&quot;)</code>) it returns the ID of the data that I want to alter, but as soon as I access the data and change one field (<code>Forms(formName).Controls(&quot;Column1&quot;) = &quot;foo&quot;</code>) and print the ID again the ID switched to a completely different dataset.
  I have absolutely no clue how that could happen. There is no other code being processed in between. I have googled for multiple hours but have not found anything in this regard yet. Maybe I am just using not the right keywords.</p>
  <p>Any help is highly appreciated.
  Thanks in advance :)</p>