I am making a form that allows users to enter in a machine part number in the format "xxx-###" or "xxx-###-###"
where the machine type, number, etc. are separated by " - "
I have written the vba code with the notinlist event so it correctly splits the user input and enters the data into the database. (E.g. "OPT-101" is split into "OPT" and "101").
Where I run into issues is when the user enters an item that is split in 2+ sections. (E.G. "OPT-101-RL"). I split into 3 parts then join the latter two with at "-" so that "OPT-101-RL" becomes "OPT" and "101-RL". However, when I add these two parts into my database like I did earlier, I successfully add the data to my database but still fire off a "not in list" error even while using a AcDataErrAdded.
I have read about various issues/fixes such as changing a 0" column width and a bound column, or using a me.cbo.requery, but neither solution seems to fix this error. What is the underlying issue, and why does my code work only with some part numbers? I'd assume it would either completely work or not work at all.
tldr; during a notinlist event I successfully add data to my table but AcdataerrAdded does not stop the "not in list" error