Solved

how to create a grid style entry for entering attendance in VB6

Posted on 2013-12-30
3
513 Views
Last Modified: 2014-01-04
I have a table in sql named Attendance with the following columns:

Agency,StudentID, Student Name, Activity, Hours, Date, Inactive

I would like to make a table in vb6 datagrid which will allow me to enter attendance in this format:

Student       Activity        [1]  [2]  [3]  [4]  [5]   [6]  [7]  etc....  
Sam Jacob    Basketball    3    3     3    3    0     0   0
Bill Johnson Basketball    3    3     3    3    0     0   0  

Then I would like to have the data from this grid input into the table.  How can I accomplish this?  The problem is listing the days of the month in the grid in a manner that will associate with the Date column of my table.

Help please...
0
Comment
Question by:al4629740
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Assisted Solution

by:Chris M
Chris M earned 250 total points
ID: 39747755
Oh my God, it's over ten years since I last programmed in VB6 but I will try to help:
The solution should revolve around getting the data from your grid object and firing a procedure per row to manipulate data the way you want it.

For instance, if you're submitting the data, let each row be entered (behind the scenes) as a single row perhaps so that you can manipulate the data as you want.

For example if date is indicated as "3", to mean 3rd December 2013, then let the procedure receive the 3 and then it converts it to the right datetime data to eb kept in that format.
0
 

Author Comment

by:al4629740
ID: 39748164
Any example?
0
 
LVL 15

Accepted Solution

by:
JimFive earned 250 total points
ID: 39748183
There is not an easy way to do this.  Probably the easiest is to create a table to temporarily hold the display data with fields: Student, Activity, Month, Day1, Day2, Day3, Day4, etc.

Then when the form is loaded (or when a new month/activity is loaded) you run a procedure to load the data into this table.

When the form is saved you run a procedure to update the main table from this temp table.

When the form is closed you need to empty the temp table.

If this is going to be multi-user then you will need to identify the user in the temp table and use some sort of locking flag in the main table to prevent multiple people from editing at the same time.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question