I have 30 TextBox items listed on a UserForm and would like to go thru each one before updating my database to make sure that a value was entered and if so, move that value to a work field. I named these boxes EntryNo1, EntryNo2, .... EntryNo30 and get them to work if I create a statement for each as follows:
If Not (EntryNo1 = Empty) Then
intOptNo1 = EntryNo1
End If
I would like to know if I can do the following in a loop instead of listing all thirty:
For i = 1 to 30
If Not ("EntryNo" & i) = Empty Then
("intOptNo" & i) = ("EntryNo" & i)
End If
Next i
If anyone can help I would very much be thankful.
If Not (EntryNo1 = Empty) Then
intOptNo1 = EntryNo1
End If
I would like to know if I can do the following in a loop instead of listing all thirty:
For i = 1 to 30
If Not ("EntryNo" & i) = Empty Then
("intOptNo" & i) = ("EntryNo" & i)
End If
Next i
If anyone can help I would very much be thankful.