Forum Discussion
Data2link
May 04, 2022Copper Contributor
If Statement on a list box?
Hello, Im hoping I can get some help with a statement I want to put on a list box. I am making a Key-checkout form. I have a listbox of key numbers. Employees can have more than one key assigned to t...
Data2link
May 04, 2022Copper Contributor
Ok thank you so much. I will try that. I should be putting this under the listbox event correct?
RichardRost
May 04, 2022MVP
The list box's AfterUpdate event, yes. And I'd rename the list box to something like KeyList, and name those text boxes something better as well. So you should end up with something like:
If IsNull(Key1) Then
Key1 = KeyList
Elseif IsNull(Key2) Then
Key2 = KeyList
Else
Key3 = KeyList
End If
If IsNull(Key1) Then
Key1 = KeyList
Elseif IsNull(Key2) Then
Key2 = KeyList
Else
Key3 = KeyList
End If
- Data2linkMay 05, 2022Copper ContributorOK thank you- I was putting it in the wrong place. Gonna give this a shot. (Great videos btw)