Hi all,
I have a data entry form that has several text boxes and a combobox on it for recording production data. I have one textbox that is auto-filled based on the value selected in the combobox. I have it autofill by using the value in the second column of the combobox. The combobox is populated by the results of a query. The query returns all of the expected values. Column 1 is text and column 2 are number values to 2 decimal places (such as 4.56).
However, whenever a value in the combo is selected and the text box fills with the required data, it rounds the value. For example, 4.56 gets rounded to 5.00 (showing the 2 decimal places) and I cannot figure out why or how to prevent it. Does anyone know what I am missing?
Code to fill the textbox:
I have a data entry form that has several text boxes and a combobox on it for recording production data. I have one textbox that is auto-filled based on the value selected in the combobox. I have it autofill by using the value in the second column of the combobox. The combobox is populated by the results of a query. The query returns all of the expected values. Column 1 is text and column 2 are number values to 2 decimal places (such as 4.56).
However, whenever a value in the combo is selected and the text box fills with the required data, it rounds the value. For example, 4.56 gets rounded to 5.00 (showing the 2 decimal places) and I cannot figure out why or how to prevent it. Does anyone know what I am missing?
Code to fill the textbox:
Private Sub prodFamily_Change()
Me.goalRate = Me.prodFamily.Column(1)
End Sub