|
-
Mar 13th, 2002, 10:33 AM
#1
MSFLEXGRID Problems
I can't figure out why for the life of me I can't use textmatrix (or seemingly any other code) in my code to change things in the flexgrid when the program runs. I am using VB5. I load info from an Access 97DB into a data control which is the data source for the flexgrid. The problem is that I do not like the headers from the database and that things are not aligned. I have managed to change the headers using SELECT..as method but I cannot align anything. Nor can I change what's in the grid boxes by using TextMatrix. Here is my code, maybe someone can help me out.
'Grid is named EmployeeGrid - Cols are set to 19, Rows to 16 and FixedCols to 0 and FixedRows to 1 at design
Data1.Connect = ";PWD password"
Data1.DatabaseName = frmMain.txtOpenFile
Data1.RecordSource = ("SELECT JobTitle As Job, PersonName As Name....FROM Employees WHERE DepartmentID =" & txtCurrentDepartment.Text)
Then it seems that code is useless. EmployeeGrid.TextMatrix(3,3) = "HERE" does nothing.
EmployeeGrid.FormatString = "^Job |<Name......." does not align the fields or change the headings if I didn't use SELECT...as above. It's like the grid won't respond to anything. I tried just a new project with a FlexGrid and no data source and just using TextMatrix and I can get that to fill in boxes and stuff but why won't it (or anything else) work here? I'm in desperate need of help. Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|