I am editing someone elses code who is no longer availible.
The code allows people to search for a member by the lastname or S.S#, however I am editing in a way to search by Member Number.
The program first has a form with 3 combo boxes, first two are sorted by lastname/SS#, and a third I created sorted by Member Number.
In the code under the event AfterUpdate I ran the code that was working, sorting by SS#, and recorded all of the variables that were changed under CmbSS#_AfterUpdate after selecting a person, finishing with a DoCmd.OpenForm "FrmEditEng"
I then hardcoded these changes to variables into the section for CmbMemberID_AfterUpdate, again finishing with a DoCmd.OpenForm "FrmEditEng". With the intent to then change the variables to be altered through the selected combo box after ensuring it worked.
However when the old code runs, when it hits the line DoCmd.OpenForm "FrmEditEng", it opens up a different form, "FrmGetSkills" which is a sub-form of FrmEditEng. When my new code runs, it heads straight to FrmEditEng. Unfortunately, FrmGetSkills it what loads the RecordSource, so when FrmEditEng loads first it attempts checks for record count and the program crashes when it comes back 0.
TLDR version, Trying to open a form that has subforms, old code opens subforms first, my new code (same syntax afaik) opens main form first which causes it to go to error.
To further confuse me, I took the new code, copy pasted it into the very first line of the old comboBox_update sections, and it worked fine. So the code within my new CmbBox_update section doesnt work, but the same code under a different event does.