@oleronesoftwares I said the question was rhetorical and didn't need a response. June's solution was perfectly adequate. I would generally do it using the method arnel recommended but I didn't offer that suggestion since June's was fine. Did you not think either of those methods was adequate? If you disagree with solutions posed by others, please feel free to comment and tell us why your solution is better. Unless I had a problem with the first solution (which I didn't ) or thought it needed additional information (which I didn't) I wouldn't have jumped in here at all. I only came in because confusing an OP with multiple "good" answers isn't actually helpful. I don't think this is a contest but maybe I missed something and there is a prize (money I hope). In which case, I missed my chance. I could have beat arnel and posted his solution ahead of him because I saw the thread before he did. But I didn't. Why confuse the issue when a useful answer had already been posted?
Sometimes the OP has trouble understanding the first workable solution. If he does, then maybe he would understand or be able to implement a second or a third more easily. but others might want to also take a deep breath and hold your fire unless further help is needed or you think there is something wrong with the original suggestion.
Cute Doc
My problem is that I came to Access already knowing how to code and now, 25 years later, I still find the logic of macros completely mystifying. My only macros are lists of simple instructions with NO logic involved. Do this, that, and the other thing. No deviations!