Cannot "add" New Employee Onto Our Employees Database?

Feb 21, 2011

ERROR RECEIVED: NullReferenceException was unhandled Object reference not set to an instance of an object.

And it points on the particular line: dsNewRow = ds.Tables("Employees").NewRow()
Imports System.Data.OleDb
Public Class Register

[code].....

View 2 Replies


ADVERTISEMENT

DataGridView Saving - Set Employee ID In The Related Table In The Grid to The Value From The Employee Record?

Sep 15, 2009

I have a VB project with a form where user adds/modifies the data, data are stored in SQL. On the form there are 2 tables that are linked by employee ID. When I test the process and insert a new employee record and add new comment for this new employee in DataGridView - when I save it I get an error that "Object reference is not set to an instance of an object". During more detailed debug it says that CurrentCell is set to Nothing - even that I do have values in all fields.I do set employee ID in the related table in the Grid to the value from the employee record - so all primary keys do have value and the comment is saved after all but I get an error and saved comment dissapears from the screen right after saving. When I pull the same new record again - everything is saved. What am I missing and how to avoid the error and dissapearing of the saved comment?

Also - I tried to save the new employee data in the first table first and then add comments - it didn't solve the problem. But if I add first part of information in the main table, save and close the form, then go back and add comment - it works fine. The problem is - it's not convenient for the user - they'd like to enter everything at once.

Private Sub TblCommentsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblCommentsBindingNavigatorSaveItem.Click
Me.Validate()[code]....

View 6 Replies

PayRoll Calculator On Vb - Program That Accepts Input Of Employee Name, Employee Type, And Number Of Hours Worked

Sep 30, 2009

You need to design and create a program that accepts input of employee name, employee type, and the number of hours worked each week for two weeks.

You must be able to select an employee type. An employee of type Trainee makes $10 per hour. An employee of type Regular makes $15 per hour. An employee of type Manager makes $20 per hour.

The program should calculate the employee pay for the week. The employee should receive 1 times the regular pay for any hours worked over the prescribed 40 hours in a week. The program should output the following information:

-The employees name without trailing or leading spaces

-Regular hours worked

-Regular pay

-Overtime hours worked

-Overtime pay

-Total pay

The Problem that i am having right now is "Displaying " the overtime hours on my "FORM VIEW" i mean i did the math right its just when i type (lblOverHrs.Text = CDec(CDec(OvrHrsWrkWeek1.Text) + CDec(txtOvrHrsWrkWeek2.Text))

Its says the "OvrHrsWrkWeek1 and 2" are not Declared which are..im not really sure where i went wrong..

Heres my code

CODE:

View 4 Replies

Best Pratice In Inheritance - Three Classes Employee, Manager And Salesman. Manager And Salesman Classes Inherits Employee Class

Jul 27, 2010

I have three classes Employee, Manager and Salesman. Manager and Salesman classes inherits Employee class.

Employee :

Public MustInherit Class Employee
' Field data.
Protected empName As String
Protected empID As Integer
Protected currPay As Single

[CODE]...

Manager :

Public Class Manager
Inherits Employee

[CODE]...

Salesman :

Public Class Salesman
Inherits Employee

[CODE]...

Now I have created a object of salesman and manager using the following code:

Dim objSalesMan as Employee=new Salesman("xyz",1,2000,5000)
Dim objManager as Employee=new Manager("abx",2,5000,"production")

Is this a good programming pratice or should I use:

Dim objSalesMan as new Salesman("xyz",1,2000,5000)
Dim objManager as new Manager("abx",2,5000,"production")

View 6 Replies

Cannot "add" New Employee Onto Our Database

Jun 4, 2011

ERROR RECEIVED: NullReferenceException was unhandled

Object reference not set to an instance of an object.

[code]...

View 12 Replies

Display The Data About Employees In The List Box?

Jun 21, 2010

i'm developing a project on employees. I have added a list box and display the data about my employees in the list box. How am i supposed to do that, do we have to put in codes or need to use that small arrow near the list box.

View 1 Replies

How To Search The Employees Based On Deparments

May 3, 2010

I have been using C# for 4 years along with SQL server. However, today I have to do small application using VB.Net to search some users based on their departments

This is the first time that I am trying to do something in Active directory (and this is the first time I ever seen the Active directory). I always write database queries and I have no idea how to do query on Active directory How to search the employees based on deparments?

[Code]...

View 20 Replies

Use Thumb Scanner To Take Attendance Of Employees Using VB?

Oct 18, 2009

Dear members please guide me how thumb scanner use to take attendance of employees using vb.net and oracle 9i.

View 1 Replies

Two Grids Displaying Records Of Employees Like Name, Job No, And Position?

Feb 8, 2010

I have two grids displaying records of employees like name, job no, and position . Now I have to swap their jobs from Emp A to Emp B which is from one grid to other.

View 1 Replies

Runnig From Server - Allow Employees To Submit Work Orders

Jun 8, 2012

I have written a small program to allow our employees to submit work orders. I want to have each computer on our network to be able to open the program, run it, and have the files (which are actually jpeg's of the form) saved on the server. This part works fine.

I have it loaded on the server and have tried to run it from several computers. While the program does run ok, it does not load the My.Settings items that are on the server. On each computer the program has, or appears to have its own set of my.settings.

If I go to the form in the program that allows me to add items to my.settings, and make changes they are saved, but when I go to the next computer they are not there. It only reflects the my.settings that were put directly in during program construction. (opened my.setting, clicked on the setting and added them there)

My question is,, how to get the program to stay on the server when running it so that the settings are there no matter which pc is running it? This is a windows forms program, I am using Visual Basic 2010 Express.

View 12 Replies

Using Collection - Store Info Of Employees On Daily Basis?

Aug 25, 2010

I am trying to come up with a way to store 3 pieces of information for each employee in the company on a daily basis. So for instance:
Day 1: Joe, 8, 80
Day 2: Sam, 10, 90
Day 3: Bill, 5, 40
Day 4: Bob, 8, 40
Day 5: Sue, 2, 50
I am very new to collections and most of the applications that I build are Create, Read, Update and Delete type applications that don't really need arrays so I have almost no experience with either.

This is what I have so far.
VB
'
Dim iDays As Integer = NumberDaysPerMonth(Date.Now)
Dim DayNumber(iDays) As Integer
Dim EmployeeRecords As List(Of String) = New List(Of String)
For i = 1 To DayNumber.Count - 1
[Code] .....

View 4 Replies

Create A Project That Will Input An Employees Sales And Calculate The Gross Pay?

Oct 24, 2011

Create a project that will input an employees sales and calculate the gross pay,deductions, and net pay. Each employee will receive a base pay of 900 plus a sale commission of 6% of sales.After calculating the net pay, calculate the budget amount for each category based on the percentages given in the tables below.

Pay
Base Pay
�900.00
Commission

[code]....

Your Form should use text boxes to input the employee name and the euro amount of the sales and also use text boxes to display the results of the calculations. Provide buttons for Calculate, Clear, and Exit. Display a message to the user for any bad input data.Hints - You need to declare module-level constants, declare variables, carry out calculations and use try/catch to handle any exceptions that may occur.

View 7 Replies

Forms :: Make An Application That Allows The Manager Of The Company Whether The Employees Are Truly Active?

Sep 18, 2011

I want to make an application that allows the manager of the company whether the employees are truly active: screenshot and a "timer" to measure the time of the activity of the employee Can be controlled using the mouse or keyboard while the application is not active, but in execution.Is it possible in vb.net to know if the user of the machine is using the mouse or keyboard? My idea is to set a "Timer" which triggers automatically after the connection of the employee and every 10 seconds the application checks whether the mouse position has changed or a letter is entered on the keyboard except the"Timer" Will Be stopped until have a new mouse position or activity on the keyboard. But the problem is: is the application able to know the position of the mouse or to capture all keyboard input even if the application n 'is not active(not in the foreground)?

View 2 Replies

One Dimensional Arrays - Display The Number Of Employees Who Have Earnt A Salary Within The Ranges Below

May 25, 2009

i am a beginner learning vb.net. I have an excercise to create a form and on clicking the totals buttons it should display the number of employees who have earnt a salary within the ranges below. Now this code works, but i want to substitute the Select Case Statement with a more efficient for..next statment to increment my counter. The code is:

[Code]....

View 2 Replies

VS 2010 Constants And Calculations - Project - Input An Employees Sales And Calculate The Gross Pay

Apr 6, 2012

This is the Project that i have to make. Create a project that will input an employees sales and calculate the gross pay, deductions, and net pay. Each employee will receive a base pay of $900 plus a sale commission of 6% of sales.

After calculating the net pay, calculate the budget amount for each category based on the percentages given in the tables below:

Your Form should use text boxes to input the employees name and the amount of the sales and also use text boxes to display the results of the calculations. Provide buttons for Calculate, Clear, and Exit. Display a message to the user for any bad input data. Now i want to know for constants its going to be : commission sale, deductions and everything in Budget? I am also guessing that for the gross pay its going to be the" Gross pay = base pay * Commission" ?

View 2 Replies

Calculate The Productivity For The Employee?

Dec 23, 2011

i want to calculate the Productivity for the employee when he saled it will add to his account by his ID so i want to calculated by ID from log in ?

View 6 Replies

Make Different Databases For Each Employee?

Oct 20, 2010

I am developing an application for employee goals and management. The application has a login screen that when a employee successfuly logs in takes him to main screen that contains a table to enter Items, Accesories, Insurance,ect. and will also allow the employee to see data from previous days. Now my question is how do I make this table that is on the Main Screen present data that belongs to only to the employee that is log in? And also How do I let this employee enter the sales for the day, update
and record into this database? Do I have to make different databases for each employee?

View 2 Replies

Mask Employee ID NUMBER?

Jun 20, 2009

I am trying to Mask Employee ID, so the user doesn't have to type the entire employee ID number CCETA01. I want them to type only two digit numbers. e.g. 01 to 99...

Here what I did but its not working:I draged from toolbox a Maskedtextbox on the Form and in the textbox progerties I put cce a. The entire number show up on my textbox pretty good but it does not allow me to change the two digit numeric number?

View 2 Replies

Make Employee Data Form?

Dec 8, 2011

Employee Data Application
Part 1: Recording employee data
For Gams, create an application that allows a user to enter the following employee

[code].....

View 2 Replies

Make Software For A Industry Of Min 200 Employee's?

Sep 22, 2007

want to know how to code in vb for developing a payroll software want 2 make software for a industry of min 200 employee's..

View 8 Replies

Search For An Employee And Show It Into Textbox?

Jun 11, 2011

i wanted to show the name of an employee once he/she typed the correct id number and password.. and it will show the name into the name textbox... same as the the current time once the user clicked the time in button it will show into the time-in txtbox...same to the time-out how its logic goes..

View 3 Replies

Show Up Details Of Employee On Selecting Row In DGV?

Jul 8, 2009

I have a form with a datagridview that show a list of employees. Right next to the datagridview, I have a small set of textbox containing employee information (name, phone, etc) which is my "details section". I have a tableadapter that populate the datagridview, this is working well. Now, what I want is to when I select a row in the datagridview, the details of the employee shows up in the details section.

I tried to bind textboxes to the correct column. It works, but if I specify the datatable a query that will get this employee info, the data of the datagridview change to be the only row in it. I want the list to be showing all results and then the details secion giving only information on the selected employee. Do I need two dataset for this?

View 7 Replies

Why To Get An Error Saying Type 'Employee' Is Not Defined

Sep 28, 2009

I have created a class using the code below. Why do I get an error saying Type 'Employee' is not defined..[code]

View 1 Replies

VS 2008 - Using LINQ To Execute A Simple "delete From Employees Where EmployeeID = 1"?

Jul 13, 2010

I am rewriting an old app that uses Linq. One part intrigued me...The code get the ID of a row from a datagridview.Then the code executes a LINQ that in the where-part make a selection based on the ID (which is the PK) to return a single object using .Take(1).SingleOrDefault Then this object is added to the dbcontext.Employees.DeleteOnSubmit() method and finally the Submitchanges is executed...I added a watch to the Log property of the datacontext, and lo and behold, when the delete query is executed, it uses ALL properties of the object in its where query. It should use the EmployeeID only since its the PK.

My question is, is it impossible using LINQ to execute a simple "delete from employees where employeeID = 1" That is basically what the above LINQ code does. But I dont want to to excute a select statement first, and I dont want it to delete by all columns, only by the id column, which an indexed PK.Any LINQ gurus wanna share some insight on this?

View 7 Replies

Check The New Employee Candidate Knowledge From Vb/C# .net Technology?

Jul 13, 2011

I have to make an interviews with programmers. Do you have any ideas how I can test their knowledge from the field of vb.net/C#?

View 2 Replies

DateTimePicker - Calculating Working Days For Employee

Mar 24, 2012

I have a problem how DateTimePicker to calculate if how many days of an employees work and the DateTimePicker1 will get the Days from another Table time in and time out and will display it in a listview the Day Time IN and TIme out.

View 3 Replies

Determine The New Registered Member Is An Admin Or Employee?

Feb 15, 2012

i am having a lot of difficulty in giving privileges to login user. i am using vb.net and sql server 2008. What i want to do is i want to create an admin account . Admin will have all access on windows form. Than i want to register employees but employees going to have some privileges on viewing forms and option. i just dont know where to set these privilege. Is it going to be in sql server. Or how am i going to determine the new registered member is an admin or employee.Please reply any 1 i m in big need to this answer. i will be gratefull if you can answer step by step.

View 3 Replies

Display Data Fro Employee Table To DataGridView?

Jan 6, 2010

I'm want to display data fro employee table to DataGridView and i intiate DataGridView and make column BloodType as code bellow

[Code]...

View 3 Replies

Employee Class Single Error Identification

Feb 15, 2011

I'm currently taking a newbie VB course (online) and in this program that I am writing, I am getting one error (red) that when double clicked in the Error List, takes me to the Application.Designer window and states that "Employee is a type in 'WindowsApplication1' and cannot be used as an expression." The only solution it gives me is to generate the Employee Class (in the designer). When I select that, it gives me 3 more errors (all yellow). The Employee class has been made, so I don't really know where else to go from here.[code]...

View 1 Replies

Employee Class Single Error Identification?

Feb 15, 2011

I'm currently taking a newbie VB course (online) and in this program that I am writing, I am getting one error (red) that when double clicked in the Error List, takes me to the Application.Designer window and states that "Employee is a type in 'WindowsApplication1' and cannot be used as an expression." The only solution it gives me is to generate the Employee Class (in the designer). When I select that, it gives me 3 more errors (all yellow).

Option Strict On
Public Class Employee
Private firstName As String ' employee first name

[code]....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved