dcsimg
June 22, 2018
Hot Topics:

Visual Basic Database Tutorial - Part 2

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

First off, we added the FlexGrid component to our project. This is just another control - like the CommandButton or CheckBox controls - that allows us to add a bit of specific functionality to our project.

The FlexGrid control allows us to very simply display all the records currently held by the Data control. In other words, if we were to tell the Data control to look directly at the Customers table (by changing its RecordSource property to Customers), the FlexGrid would display field in the Customer table.

Because we're true database divas, we're going to get all technical now. We're going to ask the database a question in SQL and tell it to display the results in the FlexGrid. That's where the bit of code steps in.

What does the code do? It simply sets the RecordSource property of the Data control to whatever is sitting in your text box. So if the text box held the text 'Customers', it would fetch everything from the Customers table. But if the text box contained an SQL question, likewise, it will ask the question and display the results.

The second line of control then simply refreshes the Data control - which means all linked items, such as the FlexGrid - are kicked and told to update themselves.





Page 4 of 8



Comment and Contribute

 


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

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date