Solved

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

Posted on 2013-12-30
3
509 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:pastorchris
pastorchris 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

740 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