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

Link or Refresh Search boxes after selection

Status
Not open for further replies.

Garyeag

Technical User
Mar 23, 2001
32
GB
I have a form with 3 search boxes which the user can use to select the record they want. However, after selecting the record the search box (a combo box, made using wizard) stays on the same item as selected.
If the user then selects another record using another criteria or by navigation buttons the item remains. How can I get the boxes to refresh whenever the record selected changes. Or could I link all 3 together.
 
These charateristics indicate that the combo box is an unbound control. There are a couple things you could do.

1) Bind the control to a field. This would cause the value in the table to be updated each time you select an value from the combo box.
2) Reset the value of the unbound combo box from code. When a search is performed which causes the value of another search box to be outdated, merely set its value to null.

Make it whatever you want in code. This is just an example.

cboSearch2_AfterUpdate
If Len(Me.cboSearch1) > 0 Then
Me.cboSearch1 = Null
End If
End Sub

Steve King Growth follows a healthy professional curiosity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top