Set db = Client.OpenDatabase("Working\Management Fees Final.IMD")
Set task = db.TableManagement
Set field = db.TableDef.NewField
field.Name = "FIRST_DDN_MGMT_FEE"
field.Description = "Added field"
field.Type = WI_VIRT_NUM
field.Equation = "-FIRST_DDN_AMOUNT*COL2*FIRST_DDN_DURATION/365"
field.Decimals = 2
task.AppendField field
task.PerformTask
Set task = Nothing
Set db = Nothing
Set field = Nothing
How can I put a loop to automate the process for Second, Third.... Upto Sixth(User Importable)?
jyotikumar
Offline
Last seen: 1 month 2 weeks ago
Joined: 04/08/2022 - 02:37
There are a few ways you can do it, this example uses arrays to hold the field names:
Sub Main
It worked. Thanks for your help.