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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autochange combobox

Status
Not open for further replies.

astech

Programmer
Jul 25, 2000
59
0
0
ID
Hi all,

I have a form with :
1. TextBox : the source is customer Data
2. Combobox : Customer Transaction Data

How Can i change automaticly If customer code in text box changed. and if i click the combobox,the combo data change with customer selected transactions,but the source change if i only click the combobox or in combobox property.
 
Hi astech,

In the LostFocusEvent of the customer code TextBox, add the code.. to get the data required, may be REQURY(), for the combo and also add ThisForm.Combo1.Refresh()

Your question says that you want that only when the combo is clicked. If that is the case.. you can do that in the GotFocus event of the COMBO and refer the customer code.. as ThisForm.txtCustomer.Value

:)
ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
in the source query of combo box you will have to give the condition "where transaction.customer=variable1" and on the lost focus or valid event of text box you can change the value of variable1 [variable1=alltrim(this.value)] and then requery the combo. hope it will help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top