I'm having troubles to give a value to a TextBox(called TextUM),according its row position in a subform.
The things is that i have i Subform called(SubFormModel3 - Zone1) and when i get into Design View i see 5 different TextBoxes (TextUM,TextUC, TextTrolley, TextUnite, Designation) and 1 Combobox.
When i enter to the DataSheet View everything is perfect, I see my 40 items(each one on a different row) and from one side i see 40 rows(each one with its own combobox option) and I want that depending on the choice (UM, UC, Trolley, Unite) of the user in every combobox, my variable (Uresult)is displayed in the proper TextBox in the row where the choice was made.
Just to clarify, i store the result of the combobox in a variable(called MeasureUnit) and the number of the row of the combobox selected(called PositionRow)
Public Sub Combobox_Click()
Expand|Select|Wrap|Line Numbers
- Dim PositionRow as Integer
- Dim MeasureUnit as String
- Dim Uresult as Double
- If (MeasureUnit = "UM") Then
- UMValue = ((QteComposants(PositionRow) / 1000) / UM(PositionRow)) ' No important
- TextUM.Value(PositionRow)= UMValue <---- Problem
- End if
Any help?