I don't normally post for help but considering this little project has already annoyed me several times and searching for help on Google so far has proven very useless I'm struggling for another option.
Basically I'm working on an easy to use front end for a database (currently Access but maybe being changed to MySQL or something in the future and if that happens I can deal with it quite easily) and upon taking the advice of Sirkent, who got said advice from somebody else (I forget who, my apologes), I now have the front-end working to the point that you can log in to the interface as certain departments and when you do it displays in a DataViewGrid a listing of all the information stored on each "asset" that that department has. Highlighting one item on the grid and clicking "edit" brings up a different screen using textboxes etc to limit what they can put in to each field, with validation on all the fields to stop people from misentering information.
The problem I have is that the ICT department has hundreds of records and they want a search option so that they can just type in a particular room number or supplier name etc and they want a list of all the computers in that room or supplied by that company, make sense? (I'm doing this for a school as an unpaid work placement so feel bad for me having to work 8:30 to 4:30 every day for six weeks, lmao).
Only problem is I can't figure out how to apply a filter to the records being displayed. Logically I thought there must be SOMETHING somewhere that would allow me to enter the SQL that I want and it'd just pull up the results that matched (for example SELECT * FROM assets WHERE assetID = "PCM25002"), and then I can have people type in "PCM25002" in to a textbox named something like "search criteria" and choose the particular field in the WHERE clause from a dropdown menu. Make sense? Only I can't figure out if adding in SQL to filter it is even possible!!!!
I've looked at most of the options for the DataGridView and all I've found so far is the "Add A Query" bit inside table adapter but all that does is create one specific menu toolbar to work on pre-typed query, it doesn't seem that you can generate a different query dynamically whenever you want.
PLEASE somebody tell me there's a simple solution for this because it's driving me nuts.
- Pete

Sign In
Register
Help

MultiQuote

