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

Set Combo Boxes to Specific values

Status
Not open for further replies.

HawkWeb

IS-IT--Management
May 30, 2005
16
0
0
US
Input Form

AcNo
Combo1 Name
Combo2 Location1
Combo3 Location2

Based on AcNo entered a PopUp form shows last 10 transactions for AcNo

PopAcno PopName PopLocation1 PopLocation2
PopAcno PopName PopLocation1 PopLocation2
PopAcno PopName PopLocation1 PopLocation2
etc

Row Source Type = Table/Query
Row Source = SELECT [ID] AS xyz_ID_xyz, [Name] AS xyz_DispExpr_xyz, [Name] FROM tblMrl2 ORDER BY [Name];


Trans 1 = PopAcno PopName PopLocation1 PopLocation2
Trans 2 = PopAcno PopName PopLocation1 PopLocation2
Etc

The values displayed by the above transactions are already within their
respective Combo Boxes.
I need the combo to display that value. In other words
when Trans 1 is selected
set default value of Combo1 = PopName
set default value of Combo2 = PopLocation1 Etc



Thanks
 
HawkWeb,
Wow, lets revisit your description of the problem to be more clear. The input form has the four fields. After selecting a AcNo, you pop up a form of last 10 transactions. The user then selects one of these transactions. You want to close the pop up and edit the transaction???
What is the Rowsource for? Why doesn't any of their field names match the field names in your examples? The rowsource is for the input form, or the popup form???

Communication is the hardest part of development


 
The RowSource is for the Input Combo1 Name Box
Similar for other Combos

Field Names are the same
 
Based on the rest of my descriptions to be correct, then the popup form will based on a transaction table filtering the top 10 records where AcNo = [enteredAcNo]. After selecting one of the records on the popup, you want to close the pop up and populate the form with the selected record? How or does a new record get created?
 
When the input form's fields have been set to selected pop up transaction, additional data may be entered on the Input Form and Input Form Data is added to the Database.
 
3 questions and one answer. I wish I could help you, but your giving me very little to work with. Though it makes sense to you, and I kind of know what your saying, your not very descriptive and my help could be way off the mark.

Use the acno_afterupdate event to show your popup. You can set the recordsource of the popup to a top 10 query using the input forms acno as a filter.

On the popup, use a onclick event to hide the form so the selection can be used to filter the input forms records. Bind the combo boxes to the recordsource so the values will be in the combo boxes. Unload the pop up form to free up the memory.

And good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top