'sup
I am making an unbound entry form. I load all the names of the controls and their assigned values into an array(x, 1), and then load the names of the fields in the query where the record will be created into another field. After a bit of comparison based upon the names of the fields and controls (they are the same), I assign the values to the fields, like so:
iCount = 0
For Each Field In aField
i = 0
Do Until i > iEnd
'Exclude MDRNo and MDRInitiatedBy from entry
If Field = "MDRNo" Then
i = iEnd
ElseIf Field = "MDRInitiatedBy" Then
i = iEnd
ElseIf Field = aName(i, 0) Then
rst(Field) = aName(i, 1)
Debug.Print Field & " " & aName(i, 0) & " " & aName(i, 1)
i = iEnd
End If
i = i + 1
Loop
Next Field
Very simple. But it is also VERY slow. It takes about 3 seconds to complete this stage of the operation.
What can I do to make this quicker?
Thanks
Ezra
I am making an unbound entry form. I load all the names of the controls and their assigned values into an array(x, 1), and then load the names of the fields in the query where the record will be created into another field. After a bit of comparison based upon the names of the fields and controls (they are the same), I assign the values to the fields, like so:
iCount = 0
For Each Field In aField
i = 0
Do Until i > iEnd
'Exclude MDRNo and MDRInitiatedBy from entry
If Field = "MDRNo" Then
i = iEnd
ElseIf Field = "MDRInitiatedBy" Then
i = iEnd
ElseIf Field = aName(i, 0) Then
rst(Field) = aName(i, 1)
Debug.Print Field & " " & aName(i, 0) & " " & aName(i, 1)
i = iEnd
End If
i = i + 1
Loop
Next Field
Very simple. But it is also VERY slow. It takes about 3 seconds to complete this stage of the operation.
What can I do to make this quicker?
Thanks
Ezra