By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,808 Members | 1,477 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,808 IT Pros & Developers. It's quick & easy.

How to autopopulate a couple of textboxes from a database table?

P: 2
I am new to VB world and developing an application which has to identify a person using their fingerprint, and i have to autopopulate the textboxes from the database depending upon who has logged in (the returned fingerprint ID from a scanner). That is, once the userid has been obtained from a reader then autopopulating the textbox fields i.e. family name, address, birthday, etc. Your post looks similar to what i need, except it gives me an "object expected" error on DAO.Datebase can you pl. explain the procedure in detail, or perhaps give some sample code to understand it.

I don't think the code I'm currently using does anything

Expand|Select|Wrap|Line Numbers
  1. TextBox1.Text = dt.Rows(0)("ColumnName1").ToString()  'Where ColumnName is the Field from the DB that you want to display
  2.         TextBox2.Text = dt.Rows(0)("ColumnName2").ToString()
  3.         Label1.Text = dt.Rows(0)("ColumnName3").ToString()
  4.         Label2.Text = dt.Rows(0)("ColumnName4").ToString()
Mar 1 '12 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,489
Fundamentally, you need to design a form which displays the values for all records from the table where you hold data related to the operators who can use your database. You then need to use the value returned from the scanner to filter that form to show only the related record. We can't be much help there as your question has so little informatoin included that we're working mostly on guesswork, but Example Filtering on a Form may help you with the concept of filtering forms.
Mar 1 '12 #2

P: 2
Thanks for that. It's the type of information I need.
Mar 1 '12 #3

NeoPa
Expert Mod 15k+
P: 31,489
Pleased to hear it :-)

Good luck with your project.
Mar 1 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.