Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. need help on admin access login screen

need help on admin access login screen

Scheduled Pinned Locked Moved Visual Basic
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    peteyshrew
    wrote on last edited by
    #1

    im creating a form where users can login to a seperate form using a login name and password. I'm trying to compare the users imput for the login to a feild in MS Access and the same with password input in a seperate feild in the same table(PCBank.mdb). if input is correct go to form2. if anyone can help it would be greatly appreciated. code below is my attempt :wtf: Imports System.Data.OleDb Public Class Form1 Dim conn As OleDbConnection Dim comm As OleDbCommand Dim dr As OleDbDataReader Dim da As OleDbDataAdapter Private Sub connect() conn = New OleDbConnection conn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=|datadirectory|\PCBank.mdb" conn.Open() comm = New OleDbCommand comm.Connection = conn comm.CommandType = CommandType.Text End Sub Private Sub DisplayRecord() Me.txtid.Text = dr.GetString(0) Me.txtpass.Text = dr.GetString(1) End Sub Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click connect() comm.CommandText = "select * from Managers where id like '" & txtid.Text & txtpass.Text & "%'" If txtid.Text = "Managers" = dr.GetString(0) And txtpass.Text = "Managers" = dr.GetString(1) Then My.Forms.Form2.Show() Me.Close() End If End Sub End Class

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups