G
Guest
I have created a code to autofill a form once a combo box has been selected.
In the combo box I have the column cout set to 12 for all the field types. I
have also set the default value of the combo box to "". I have all the
autofill fields set as unbound. I have the combo box bound to the 1 column.
However when I select the name in the combo box I get an error.
Error 13
Type Mismatch
All but (1) field types that are being assigned to the unbound are is an
Long Integer autofill. Would that create the probelm. I tryed to see if it
was necessary to Dim them all as a string. But that did not work. Can
someone tell me what is wrong. When I tryed to debug it I still got the
error message on a field that was not the Long Integer autofill.
Here is the string:
Dim KeyContractor As String
Dim Address As String
Dim City As String
Dim St As String
Dim Zip As String
Dim Contract_Person As String
Dim MainPhone As String
Dim FaxNumber As String
Dim Revd As String
Dim Cost_Code_Trade As String
Dim Supplier As String
Dim Status As String
Me.KeyContractor.Value = Me.Contractor(1)
Me.Address.Value = Me.Contractor(2)
Me.City.Value = Me.Contractor(3)
Me.St.Value = Me.Contractor(4)
Me.Zip.Value = Me.Contractor(5)
Me.Contact_Person.Value = Me.Contractor(6)
Me.MainPhone.Value = Me.Contractor(7)
Me.FaxNumber.Value = Me.Contractor(8)
Me.Revd.Value = Me.Contractor(9)
Me.Cost_Code_Trade.Value = Me.Contractor(10)
Me.Supplier.Value = Me.Contractor(11)
Me.Status.Value = Me.Contractor(12)
In the combo box I have the column cout set to 12 for all the field types. I
have also set the default value of the combo box to "". I have all the
autofill fields set as unbound. I have the combo box bound to the 1 column.
However when I select the name in the combo box I get an error.
Error 13
Type Mismatch
All but (1) field types that are being assigned to the unbound are is an
Long Integer autofill. Would that create the probelm. I tryed to see if it
was necessary to Dim them all as a string. But that did not work. Can
someone tell me what is wrong. When I tryed to debug it I still got the
error message on a field that was not the Long Integer autofill.
Here is the string:
Dim KeyContractor As String
Dim Address As String
Dim City As String
Dim St As String
Dim Zip As String
Dim Contract_Person As String
Dim MainPhone As String
Dim FaxNumber As String
Dim Revd As String
Dim Cost_Code_Trade As String
Dim Supplier As String
Dim Status As String
Me.KeyContractor.Value = Me.Contractor(1)
Me.Address.Value = Me.Contractor(2)
Me.City.Value = Me.Contractor(3)
Me.St.Value = Me.Contractor(4)
Me.Zip.Value = Me.Contractor(5)
Me.Contact_Person.Value = Me.Contractor(6)
Me.MainPhone.Value = Me.Contractor(7)
Me.FaxNumber.Value = Me.Contractor(8)
Me.Revd.Value = Me.Contractor(9)
Me.Cost_Code_Trade.Value = Me.Contractor(10)
Me.Supplier.Value = Me.Contractor(11)
Me.Status.Value = Me.Contractor(12)