View Single Post
  #2 (permalink)  
Old November 29th, 2015, 08:44 AM
malcolmdixon malcolmdixon is offline
Authorized User
Points: 346, Level: 6
Points: 346, Level: 6 Points: 346, Level: 6 Points: 346, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2010
Posts: 61
Thanks: 0
Thanked 13 Times in 13 Posts
Default 1 textbox and 1 combobox to a double number

Hi,

If you haven't managed to sort this yet, here's one solution.

I'd use a combobox for pre1unit with 2 columns, set a value list 1000000, "Mega", 1000000000, "Giga" etc. Hide the first column by setting its size to 0cm in Columns Widths. Set Limit to List to Yes.

Set the AfterUpdate events of the textbox and combobox to calculate the prevalue:

Code:
Private Sub UpdatePreValue()
    Me.TextPreValue.Value = Me.TextPre1.Value * Nz(Me.ComboPre1Unit.Value, 0)
End Sub
I hope that helps you out.

Malc.
Reply With Quote