Nice looking application!
Are you wedded to a combo box? This can be managed with a combo box, a list box (not nice) or an option group. I rather like the idea of an option group of toggle buttons because I think it would fit well with your look and feel.
Anyway, the logic is always the same. I think for you, rather than managing an unbound textbox and label for the chosen measurement, it would be cleaner and easier to manipulate the visibility of a stack of four bound textboxes. I see you already have the textboxes so the design work will be minimal. (Note when you hide a textbox its label is also hidden.)
Here's a picture of how it might look - OK, use your imagination.
- Stack the existing textboxes one on top of the other. You will now have to use the Property Sheet combo box if you want to select and/or change their properties.
- Use the control wizard to build an option group of toggle buttons. Change the text size, button size, button position (must remain inside the box but then you can adjust the box boundaries), etc.,etc.
- Superimpose the stack of textboxes on top of the option group (send the option group to the back if necessary).
That's it for the design. Now an indication of the programming necessary.
In the form module define a new sub procedure, perhaps naming it SynchroniseMeasurement. Here's an example of what it might look like.
Code:
Private Sub SynchroniseMeasurement()
Select Case Me.optMeasurement
Case 1
Me.txtUnit.Visible = True
Me.txtGSqFt.Visible = False
Me.txtRSqFt.Visible = False
Me.txtAcres.Visible = False
Case 2
Me.txtUnit.Visible = False
Me.txtGSqFt.Visible = True
Me.txtRSqFt.Visible = False
Me.txtAcres.Visible = False
Case 3
Me.txtUnit.Visible = False
Me.txtGSqFt.Visible = False
Me.txtRSqFt.Visible = True
Me.txtAcres.Visible = False
Case 4
Me.txtUnit.Visible = False
Me.txtGSqFt.Visible = False
Me.txtRSqFt.Visible = False
Me.txtAcres.Visible = True
End Select
End Sub
You must use your own control names.
Now you need to call this sub procedure from two events: the form's On Current event and the option group's Before Update event (could use After Update - same, same) If you don't know how to do this then repost.