'I am trying to populate multiple text boxes with one dropdown list

user can select only one key number at a time and I have placed the code on the listbox in the control both under expression, didn't work- then under code builder- with If / end if, didnt work, under event for list box- didnt work. all of this is on one form. I just want the following code to say "hey- you are assigning a key to them, they already have a key in text box 1- so put the key in the next empty text box...and so forth". I'm just using the code that was given earlier- and I have put it in with the format given and I verified with the link you provided. So I am not sure where Im going wrong. Am I putting the code in the wrong place? Where would I put that code if I am putting it in the wrong place?

=iF IsNull(Key1) Then Key1 = ListBox ElseIf IsNull(text86) Then text86 = ListBox ElseIf IsNull(text103) Then text103 = ListBox ElseIf IsNull(text105) Then text105 End If

This brings back a invalid Syntax error



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source