Hi Folks. I'm lost and I can't find a spot where this answer exists. I'm opening a specific form to a specific record. Easy right?
And that ID is the primary key...
The form opens up to the correct record. Then I have some code that runs after the form is open, the form displays the correct record, but information from the very first record is run... I'm so confused I almost want to add a bunch of screen shots.
Form says record 3003 and displays record 3003, and runs with information from the first record. I deleted the first record just to see what would happen (it was junk data) and the new first record is what comes up. And I have no idea what caused this.
Interesting additional fact. I moved the open call to an embedded macro. Everything worked perfectly... I moved the open call back into vba, broke again...
If I posted an image here, it would be one of me tearing my hair out.
Code:
DoCmd.OpenForm "frm_WorkOrder", acNormal, , "[ID]=" & [ID], , acWindowNormal
The form opens up to the correct record. Then I have some code that runs after the form is open, the form displays the correct record, but information from the very first record is run... I'm so confused I almost want to add a bunch of screen shots.
Form says record 3003 and displays record 3003, and runs with information from the first record. I deleted the first record just to see what would happen (it was junk data) and the new first record is what comes up. And I have no idea what caused this.
Interesting additional fact. I moved the open call to an embedded macro. Everything worked perfectly... I moved the open call back into vba, broke again...
If I posted an image here, it would be one of me tearing my hair out.
Comment