|
greg85374
Starting Member
USA
8 Posts |
Posted - 07/16/2004 : 15:30:37
|
Basically I created a custom calendar--it is set up the same was as microsofts calendar(active x control)
the following is all from VB6 NOT vb.net
I created a sqlstatement: SQLString = "SELECT * FROM TblEmpAttendance WHERE Date = " & SomeDay
The valiable Someday holds all the values(from a loop) for the valid days in the current month and year!
I need to do the following: Chk which employee(EmployeeID) the user is currently working on Search the aforementioned table for that employee Load the data(result set) int a textbox array in my custom calendar My txtbox array is TxtDate(0) - TxtDate(42) but only 31 MAX are valid I say MAx cuz there may only be a MAX of 31 days in a month
I tried(To start with): Private Sub LoadValues() Dim SQLString, SomeDay As String Dim StartPoint, StopPoint, I As Integer
'Add Values to textBoxes For I = 1 To 31 Step 1 'loop only though valid textboxes SomeDay = MyMonth & "/" & I & "/" & CboYear.Text SQLString = "SELECT * FROM TblEmpAttendance WHERE Date = " & SomeDay AdoQuery.RecordSource = SQLString TxtDate(I).Text = SQLString Next I
End Sub
Unfortunatley I cant refer to the result AND i have NEVER tried anything like this before-I dont even know where to start!!
Any help would be highly appreciated!!! Thanks in advance!! |
|