Did you ever get ahead of yourself, thinking about how to implementsteps M, N, O when you hadn’t finished the code for F, G, H?
I just had that happen.
I have some code on my main student form tied to _CURRENT. When the record opens, it tests several dates to see if an eye exam or whatever needs to be performed. If it’s missing, expired, or about to expire, a text box is made visible and populated. If everything is OK, you never see the box on the screen. Easy enough, works great.
I needed to test a new condition, but it wasn’t directly related to the record that I was on. The objective was similar: check to see if the student is enrolled in a specific program. So I performed a DLOOKUP to get a count, if the count was greater than zero, they were in the program. To do a quick and dirty check, I popped up a message box saying ‘Student is enrolled’.
The problem was that the message box would pop up before the form rendered. I stared researching what event fired after _CURRENT that I could trap and was getting frustrated when I realized it did not matter.
The end goal was that a locked text box would display with the name of the teacher of the class that I was checking for (which could be changed elsewhere in the system). Which was exactly what my code was already doing. Look up the teacher name from a join with another table, make the box visible, else make the box invisible. No problem.
I would give myself a dope slap but last week I smacked myself in the forehead with my hatchback door, so a repeated head injury is probably best avoided right now.