PDA

Click to See Complete Forum and Search --> : Displaying Records on DBGrid


Brandr
Jul 10th, 2000, 03:05 PM
I'm running VB5, and I've created a INPUT Box which searchs for a Customer Number (based on the customer name that the user inputs), and then launchs another form to display the name(s) on a DBGrid.

The search seems to work, but it never brings back all of the correct records. For example, when I type in "Smith" VB brings back 3 records when there are 94 Smiths in the database. I'm not sure how to fix this or why this is happening.

Additionally, the database that VB is accessing has three columns (the customer number, customer name, and customer status). I'm not sure how to make it so that VBGrid can display these three columns (as it seems to only be able to display two). In other words, what must I do to have VBGrid display the customer status along with the customer name and customer number?

Thanks for your help,
Brandr Beekman
bbeekman@rbscorp.com

CGTS
Jul 10th, 2000, 09:25 PM
I think we need a bit more info on what you have already and maybe let us know if you are using DAO/ADO code or data access objects. Also, do you have any code for the DBGrid or is it accessing the data through it's properties?

If you are using an Input box, there could be spaces in your data, perhaps using a combo or list box with a list of unique entries would be better.

Brandr
Jul 11th, 2000, 03:51 PM
Thanks for your help- before I was going to post the code I looked it over. I noticed a small flaw in my SQL (something which shouldn't have mattered anyway). I experimentally changed it, and everything works. Thanks for your time and support! -Brandr