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

Refreshing search query results on a from

Status
Not open for further replies.

Maggie24

IS-IT--Management
Jun 29, 2004
36
IE
Hi guys,

I have a list box which displays the results of a search query:

SELECT tblProducts.[Product No], tblProducts.[Item No], tblProducts.[Item Description 1], tblProducts.[Element Description], tblProducts.Updated
FROM tblProducts
WHERE (((tblProducts.[Element Description]) Like "*" & [type prompt here] & "*"));

Basically the user can update the records displayed and the update field is made true for that record.

After the update I want to refresh the listbox so that the user can see what the new updated status of the records, but by using listbox.requery - i get a pop up box asking me to type in a prompt again.... i dont want this i just want to automaticallt refresh the listbox records on the page.... is this possible..what way can access remember the value i inititally entered as the prompt.

tks guys all help is appreciated!

Maggie May
 
Maggie,
Instead of prompting for what to search for, I'd point to a textbox on your form instead.

example:
WHERE (((tblProducts.[Element Description]) Like "*" & [forms]![myForm]![txtSearch] & "*"));

Then, include an inputbox on the form_load event to set the initial value:

on form_load()
txtSearch = inputbox("Insert prompt here")
end sub

If you like, set txtSearch.visible = false to make it more 'behind the scenes'. or just leave it out in the open to give the users more power.

Hope this helps!

RoppeTech
 
cheers roppetech - i think your solution should do the trick, i will let you know how i go!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top