A family of Microsoft relational database management systems designed for ease of use.
Nice try, but this simply doesn't work. It puts up a message box. I'm not trying to populate a message box.
I've been struggling with this for over a week now, and to be honest, I'm about to abandon the whole project over this. This should be such a simple thing to accomplish. I can't believe Access has no way of doing it. Yet every reply I've gotten to my question has offered solutions that either don't work or are simply unrelated to what I need to do, and nothing I've tried works.
Let me explain this one more time:
I have a Form. The Form has a Control on it called HdrLabelwhich is bound to the same field name in the underlying Table.
Now, on exiting the Form, I have a macro: SetTempVar
Name Label_Var
Expression [Forms]![New_Entry]![HdrLabel]
I then open a second Form which has a Control on it called DtlLabel. That Control is bound to the same field name in its underlying table. But the two fields/controls need to contain the same value because each is the primary key and the two files are linked by that key.
So, when the second Form opens, I don't want the users to have to type in the Label id again, because they could make a mistake and foul things up.
The HdrLabel Control from the first Form needs to simply be populated in the DtlLabel Control on the second Form. I don't know why this is so difficult. But no one seems to know how to make it work.
A couple of times, something I did caused the program to blow up with an error, which was a good thing, because when I clicked on Debug, I was able to hover my cursor over the TempVar value coming into the second Form from the first Form, and it was there and correct.
So the problem is not with setting the TempVar on an Event on the first Form. It's getting that TempVar to appear in the Control on the second Form.
Like I said, I just can't believe Access has some very simple way to do this. I mean it's like Programming 101. And yet no one has been able to provide an example of code that actually works.