RSS Forums RSS
Please support our VB.NET advertiser: Programming Forums

Retrieving Fields from MS Access

Join Date: Oct 2007
Posts: 6
Reputation: SerapH is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
SerapH SerapH is offline Offline
Newbie Poster

Solution Re: Retrieving Fields from MS Access

  #3  
Oct 22nd, 2007
Hi there Manal

I managed like you said!

Twisted the code around to make it appropriate for the View Balance bit, as follows :


Private Sub btnBalance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBalance.Click

Dim cmd As New OleDb.OleDbCommand("select AccountNo,Password,Title,Name,Surname from AccountDetails where AccountNo='" + txtAccountNo.Text + "'", conn)

conn.Open()


Try
Dim rdr As OleDb.OleDbDataReader = cmd.ExecuteReader
If rdr.Read Then

Dim p As String = rdr(1)
If txtPassword.Text = p Then

Label3.Text = rdr(2)
Label4.Text = rdr(3)
Label5.Text = rdr(4)




This way ... once the form is uploaded and the user re-enters the account no and password ... details will be shown.

You had already replied to my previous post, but I wasn't getting anywhere. Second time around I managed ... so THANKS A lot


Just want to add ....

I don't know if you can help .... is there a way how I can eliminate re-entering the account no and password in the Balance form.

Example .... to get data from Login form entries. This way the user does not have to re-enter his login details.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:02 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC