Wrox Programmer Forums
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 26th, 2011, 03:02 PM
Registered User
Join Date: Aug 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error in loginpage coding

hai i got an error in my coding,The error is expression expected . Please advice me how i am to correct my coding.Here is my coding which is connected to database
In my coding , i create 3 testbox which is txtusername.text, txtpassword.text and txtdepartment.text
. User must key in they username ,password and their department in the login page, if the user department is Admin then he will access into
admin page and if user department is store then he will access into store page. I am still new beginner in this vb language and for your info
i am using visual studio 2005 and sql 2005.Here is my code and my interface

Public Class Form1
    Dim r = Me.StaffTableAdapter
    Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As  System.EventArgs) Handles btnlogin.Click

        Dim r = Me.StaffTableAdapter.UsernamePassword(Me.txtusername.Text, Me.txtpassword.Text, Me.txtdepartment.Text)
	If r me.txtdepartment.text is Caunter Then
        else if
             me.txtdepartment.Text is Admin Then
       else if
             me.txtdepartment.text is store then
        End If
        MsgBox("invalid username and password")

    End Sub

Similar Threads
Thread Thread Starter Forum Replies Last Post
about coding error santosh kumar roy ADO.NET 4 February 13th, 2012 05:47 AM
Coding error in the book Mohammad Rastkar BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 April 27th, 2009 02:51 AM
coding error using checkbox in datagrid vivek_inos ASP.NET 1.0 and 1.1 Professional 4 April 28th, 2008 03:36 PM
Trying to insert Data in sqlsever from loginpage bsp ASP.NET 2.0 Basics 3 March 21st, 2007 05:51 AM
All Array is not returning [Coding Error] vinod_yadav1919 Javascript How-To 0 January 18th, 2005 10:10 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.