-
Coding for DBGrid1
hello all,
i am new to this forum, and have posted two other thread so far and had great help, wanted to thank all of you for that
i am not good in vb6 so i do need further assistance.
I am trying to select 3 fields from the Updater table and write the result into a nother table called Reporting, and i have the codes below, all works fine
Code:
Dim DB As Database
Dim rs As Recordset
Dim rs1 As Recordset
Dim tname As String
Dim strdate As Date
Dim strdate2 As Date
Dim SQL As String
Set DB = OpenDatabase(App.Path & "\Project Light Speed.mdb")
strdate = DateAdd("d", 7, (DTPickerWeek.Value) - 13)
strdate2 = DTPickerWeek.Value
SQL = "delete * from Reporting"
DB.Execute SQL
SQL = "insert into Reporting (Job_ID, PM_Tool, Task_Group, Task_Desc, Market, WBS_Desc, Taper_Code, WC_CLLI, Title, Dater, Work_Autho, LU, DA, Date_Ending) select * from [Updater] " & _
"where Dater >=#" & strdate & "# And Dater <=#" & strdate2 & "# " & _
"And Market='" & combomarket.Text & "' And WBS_Desc='" & combowbs.Text & "'"
'Debug.Print SQL
'Set rs = DB.OpenRecordset(SQL)
DB.Execute SQL
SQL = "UPDATE Reporting SET Date_Ending=#" & strdate2 & "#"
DB.Execute SQL
Right now what i did was to get a crystal report to read the records from table Reporting and display, which works, but when i tried to install it to the server, the server has alot of error for crystal report, to avoid all that, how do i code in vb that if i click a command1 button, all the records that was written into reporting willl be displayed at DBGrid1, please help
joyce
-
Re: Coding for DBGrid1
Did you package your application using an installation and setup package, and run the resulting Setup.EXE on the server or just copy stuff over?
-
Re: Coding for DBGrid1
hi
i used the "package and deployment wizard from vb6"
thanks
-
Re: Coding for DBGrid1
Hi
i managed to get the MSFlexGrid1 to work, how do i set the column width at form load , since some of the column are too small to display the results during run time
joyce
-
Re: Coding for DBGrid1
After you have filled the grid, adjust the size of the columns to suit the contents.. the code isn't as simple as we would like it to be, but I have written a Sub to do the work - which you can get via the 'FlexGrid autosize' link in my signature.
-
Re: Coding for DBGrid1
hey
thank you for the help
i will look through your code and try it on