This may be a silly question but, I found this code online and used it on my form and it works!. This is the code (used as a macro):
SetTempVar
Name ActiveControlValue
Expression = [Screen].[ActiveControl]
SearchForRecord
Object Type
Object Name
Record First
where condition =="[lngID]=" & [TempVars]![ActiveControlValue]
So basically what happens is I have this combo box and there is a textbox below it. If I click on some other value in the combo box, then the textbox value automatically changes.
Now I am curious as to how the code works. Could someone explain?
Thanks!