Table with 3000 records with 21 column fields
I need to loop thru the records using the 2 column fields (Field2 and Field3) where there are a null values to Produced a New column field (Field4) I started with this function below but I am stuck since case select cannot accept null- or I may need to use nested iifs which I am not good at.
SampleTable
Name(Field1) Parts(Field2) Categories(Field3) New Field(Field4)
1 A1 R1 Inventory
2 A1 Null Inventory
3 B1 R1 Processing
4 B1 R4 Processing
5 B1 Null Unknown
6 Null Null Unknown
My function:
Function MachineCheck(Field2, Field3) As String
Dim newValue As String
Select Case (Field2)
Case "A1":
Select Case (Field3)
Case "R1"
newValue = "Inventory"
Case Is null
newValue = "Inventory"
Case "R1"
newValue = "Inventory"
Case “ “
newValue = "Inventory"
Select Case (Field2)
Case “B1”
End Select
MachineCheck = newValue
End Function
Thanks for your help!