I tried it on mine and it works. I just wish you can have more control on the product. Mine prints two thirds of the way and then cuts off the printing.
Andy,
I hope you that you would'nt mind but I found out that I did not do an actual multiple sort when I tested the code that you recommended. I found out that the last part, which is populating the flexgrid back, was not working properly. I tried to correct it to no avail. Would you mind...
I found the solution to my problem. Outside of the the DO Loop, assign I = row number and inside the loop replace the syntax " For I = 4 To hfgbud.Rows - 1 " with I = I +1. Remove the outside "Next".
What am I doing wrong? I ran the same SQL on my Access database and I showed 194 records but when I ran this code in the VB program to populate my MSHFlexGrid only the last 20 or so are showing on the grid. Running the debug, I can see that it is picking up every record up to number 22 and then...
...adodb.connection
dim rs as adodb.recordset
dim strSQL as string
set conn = new adodb.connection
set rs = new adodb.recordset
strSQL = "SELECT * from tablename"
conn.open = "Microsoft.jet.OLEDB.4.0;data source ="path\dbname.mdb"
rs.open...
I'll appreciate some help. I populated my grid from Access DB and now after some data changes I want to save it to the DB. The grid is not bound. What is the simplest code I can use to do this? A sample code would be helpful..
Do a variation of the following:
Option Explicit
Dim cn As ADODB.connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
MsgBox cn.version
End Sub
Private Sub Form_Load()
Set cn = New ADODB.connection
Set rs = New ADODB.Recordset
cn.Open "Provider =...
Brian,
It worked with SQL statement. One more thing, how do I go about creating similar reports, but passing parameters to the SQL from VB. Is it possible? I tried but Crystal Report would not let me do it.
Thanks again....
I am newbie with Crystal Report and I would like to ask the experts a basic question. I am using Crystal Report 8.5 with VB and Access db.
1. Is there a direct way to use a SQL statement in Crystal Report? It is a complex SQL statement that retrieves data(SELECT), Total by group(SELECT...
Andy,
I have not tried this out yet but it makes sense and it should work. Using a listbox to do the sorting is a neat idea which I never tried before. I will try it out and let you know how it worked. Thanks a million...
Can anyone tell me if I can do multiple column sort on MSHFlexgrid? I have done single column sort but not multiple. I cannot find any reference. Thanks in advance.
...range" when stuffing data into strArray(6)?
dim strArray(7) as string
Private Sub Form_Activate()
Dim strSQL As String
strSQL = "SELECT * from JournalID"
Dim strDCCode As String
Dim strArray(5) As String
Dim intPos As Integer
Set cnDB = New ADODB.Connection
cnDB.Open...
There are probably several ways of doing it, but I do mine this way in a bound datagrid:
dim strData as string
strData = adoData.Recordset.Fields(IndexNO)
Think of the row as an array with index numbers. Index number (0) being the first column on your grid.
When I ran into these problems, I usually debug and determine where my programs are exiting. First find what component is causing it and then go from there. Maybe you have a third party software that is not properly licensed or registered in the registry. Good luck!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.