August 29, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Visual Basic Database Tutorial - Part 3

  • November 19, 2002
  • By Karl Moore
  • Send Email »
  • More Articles »

Sometimes you don't want a database to return every single record. For example, you may simply want to show the orders for one particular customer.

In Microsoft Access, you can specify criteria for a particular field by placing the value underneath the fieldname.

For example, the below query on our Nwind.mdb database shows the ContactName for records where the CompanyName is equal to "France restauration"

When we enter Datasheet View, we get this:

And when we nip into SQL View, we get this:

SELECT Customers.CompanyName, Customers.ContactName
FROM Customers
WHERE (((Customers.CompanyName)="France restauration"));

And that's just saved us having to write and debug our own SQL statement. Access did all that hard work for us.

Top Tip: You will often use SQL statements in your Visual Basic applications. We'll be using them later in this week's tutorial...





Page 3 of 10



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel