Data Control

Getting a fields value

You can extract the contents of the fields by examining the corresponding properties of the bound controls. So, to find the value of the ISBN in the current record, you look at the text property of the bound control that displays that field (in this case, txtISBN). The following code displays a message box displaying the ISBN.

Msgbox "ISBN: " & txtISBN.Text

If you do not want a particular field to be displayed, but still want to get its value, set the text box's (or label's) visible property to False.

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” - Bill Gates