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

Combo Box Selection

Status
Not open for further replies.

lbunch

Programmer
Sep 5, 2006
120
US
I have two combo boxs 1 is "comboemp" that has 4 columns and the other is comborev for the rev#

Emp Hiredate Loc rev#


All of the columns have the same information except the last column rev#

When I want to select the first rev# to look at the records for the emp - I get the last record instead.

I have a query running also on onchange event to requery the form based on forms!frmemp!comboemp and in the comborev number shows the last record also. But when I select 0 in the rev# - my form shows the correct record.

How can I get the form to show the records based on any selection I make in the combo box comboemp?????
 
Your post was somewhat confusing. Do you want to filter the records based on the rev# or goto a record with that rev#? Is rev# unique as in a key? To goto a record based on the rev# you can use the recordsetclone and the find method to goto it. If you want to display all the records which match the rev# then build criteria for a filter and set the filter on.

Why are you using the OnChange event and requerying?

Dim rs As New ADODB.Recordset

If Len(Me.cboGoTo) > 0 Then
Set rs = Me.RecordsetClone
rs.Find "[LRU Part Number]='" & Me.cboGoTo.Column(0) & "'"
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If

----------------- OR
Me.Filter = myCriteria
Me.FilterOn = True



---------------------
scking@arinc.com
---------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top