Access2007 VBA
I currently have the following code:
etc. etc
Is there any way I can reduce it to something like
Cust!UTC17 contains a number
Cod contains multiple columns named COD1, COD2, COD3 etc.
I want to use the number contained in Cust!UTC17 to decide which columns value to assign to U17
Any advice much appreciated as my searching has not revealed a solution.
I currently have the following code:
Code:
If Cust!UTC17 = "1" Then
U17 = Cod!Cod1
Else
If Cust!UTC17 = "2" Then
U17 = Cod!Cod2
Else
Is there any way I can reduce it to something like
Code:
U17 = "Cod!Cod" & Cust!UTC17
Cod contains multiple columns named COD1, COD2, COD3 etc.
I want to use the number contained in Cust!UTC17 to decide which columns value to assign to U17
Any advice much appreciated as my searching has not revealed a solution.
Comment