Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

put data from Combo box on sub form to text box

Status
Not open for further replies.

tekaccess

Programmer
Oct 24, 2006
31
CA
Hi to all
I want to select an item from combo box (on a sub form) and put the coressponding value on on the bounded text box on the same subform (child form) against a given condition.
on my sub form i have three objects:
1-combo
2-two bounded text boxes
if i select one value from combo the coressponding value should be come on one text box against the given value of other text box.

Thanks
 
Hi tek,


in cmbMyCombo <on update> event:
Code:
if((cmbMyCombo = x) and (textbox1 = x)) then textbox2 = xyz


ATB

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Hi tek,

Sorry ...

Code:
IF((cmbMyCombo = x) AND (textbox1 = z)) then textbox2 = z

ATB

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Thanks Darrylle
I mentioned that i am working on bound controls.
If I select 1y,2y,3y from combo then other boud control should show the respected values from the table

I have already stored the value in table under 1y,2y,3y
I am using as
Private Sub Plan_Type_AfterUpdate()
If Me.Plan_Type = "30 Days" Then
Me.Sale_Price = Sale_Price_30
ElseIf Me.Plan_Type = "One Year" Then
Me.Sale_Price = Sale_Price_1Y
ElseIf Me.Plan_Type = "Two Years" Then
Me.Sale_Price = Sale_Price_2Y
ElseIf Me.Plan_Type = "Three Years" Then
Me.Sale_Price = Sale_Price_3Y
Else
Me.Sale_Price = 0
End If

any suggestion
 
Howdy tekaccess . . .

It must be me because I'm not grasping this too well.

Could you give an explicit example? . . .

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top