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 another way?
SampleTable
Query calls this function
Thanks for your help as always!
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 another way?
SampleTable
Code:
Name Parts Categories New Field (Field1) (Field2)(Field3) (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
Code:
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
Status: MachineCheck ([Field2],[Field3])Thanks for your help as always!
Comment