Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
greg85374
Starting Member
8 Posts |
Posted - 2004-07-16 : 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.netI created a sqlstatement: SQLString = "SELECT * FROM TblEmpAttendance WHERE Date = " & SomeDayThe 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 onSearch the aforementioned table for that employeeLoad the data(result set) int a textbox array in my custom calendarMy txtbox array is TxtDate(0) - TxtDate(42) but only 31 MAX are validI say MAx cuz there may only be a MAX of 31 days in a monthI tried(To start with):Private Sub LoadValues()Dim SQLString, SomeDay As StringDim StartPoint, StopPoint, I As Integer'Add Values to textBoxesFor 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 IEnd SubUnfortunatley 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!! |
|
|
|
|