search box

  • Thread starter Thread starter Bill H.
  • Start date Start date
B

Bill H.

I'd like to add a "search box" to my form that allows for searching the
table of names and addresses by one of the fields I've created (lastname & "
" & firstname) to see if the person is in the table.

I need to be sure that what appears in the search box does not in any way
allow the data to be changed. I tried a combo box, but that allowed the
data to be changed, and I couldn't get rid of what was displayed in the box
as I moved to other records.

I could do a find on the lastname field, but I want to see several nearby
names all at once.

Thx
 
either a combo box control or a list box control can be used to "find" a
record in a form. as long as the control is unbound (the ControlSource
property is blank), selecting a specific item in the list will not change
any data in any record displayed in the form. (if you want to prevent the
user from changing *any* data displayed in the form, set the form's
AllowEdits property to False.)

to "get rid of" the chosen selection in the control, after the search has
completed, just add an extra line of code after the "search" code, such as

Me!MyComboBoxName = Null

hth
 
Back
Top