ok, so.. if i right click on a card it brings up an editor to show.. in there i can set the card to owned and other things later.. so atm, it works for the first set in generation 1.. but when i try to say i own a card in the second set, i get this error:
Field 'Table1.Type 2' cannot be a zero-length string.
Code:
Private Sub Command5_Click()
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandText = "update Table1 set [type 2] = '" & cboType2.Text & "', PSA = '" _
& cboPSA.Text & "', own = '" & cboOwn.Text & "' where cardset = '" & gCardSet & "' and cardnumber = '" & gCardNumber & "'"
Set rs = cmd.Execute
Sleep 2000
Form2.ResetGrid
Unload Me
End Sub
ok.. so i'm confused.. i can say i own a card or not in the first set, but i can't do so in another set? that makes no sense..
Last edited by elRuffsta; May 7th, 2024 at 02:53 PM.
Are you trying to save a non-zero-length string and it thinks it's zero-length or are you trying to save a zero-length string and the field doesn't allow that?
it's a simple "Yes" or "No" in the database.. it works just fine for the first set but not any other set.. you choose yes or no via a combobox in the edit form.. not much to it honestly. just not seeing how it works for the very first set but not any other set i select. that's the issue. why does it only work for the first set but not all sets? that's my question.
Well... No = False = 0 and True is anything else which I don't like. I'd like it a lot more if True were one specific value but that's beside the point.
If it's a boolean field then it should accept any numeric value. If you mean literally "Yes" or "No" then if you're sending it one of those then I'm not sure why it wouldn't accept it because it's either two or three characters.
I'd have to see the field definition in the table to diagnose it better.
Edit: I take back the part about a Boolean field accepting any numeric value. I never tried to put anything else in a Boolean field and don't know if it will work or not but it would be simple to intercept and force it to be true or false.
E.g.
If Value <> 0 Then
RecordSet.Field("BooleanField") = True
Else
RecordSet.Field("BooleanField") = False
End if
Something like that.
Last edited by cafeenman; Apr 4th, 2024 at 05:17 PM.
atm, i am using a smaller version of the DB than it's upscaled version which i want to use that has lots more in it.. but when i try to do it, i come across alot of issues.. so, i'm stuck between a rock and a hard place.. i'm working on it tho..
i'm on vacation as of today and going back home for the week.. so i can't put much more time into this until next sunday the 14th... not looking forward to the 18hr drive each way. anyways, we can cotinue on this then.. if i have a chance to pop in on a pc while on vaca i'll check in.. thank you.
Re: [ON PAUSE] - MS FlexGrid edit.. i'm going on vacation
Originally Posted by cafeenman
Also too, what's the Sleep command about? Is that just giving the server time to update or something?
i didn't impliment that back in 2004.. all i can tell you is when the change of owning or not owning it takes a second or 2 to update the db and refresh the grid.. personally i expected any changes to be INSTANT and fast.. so i may have to re-do all this
Re: [ON PAUSE] - MS FlexGrid edit.. i'm going on vacation
I'm not sure what happens if you have code after Unload. You might have to move the unload to after all the debug.print stuff. I think it's ok as is but not sure.
If you get no immediate window output at all that's probably the problem. Or it might stop the form from unloading or who knows what. Someone knows. I'm not one of those people.
Re: [ON PAUSE] - MS FlexGrid edit.. i'm going on vacation
Well.... that's all I've got. It's been forever since I played with ADO. I'm assuming your string is correct and not the problem. But someone who knows more about it will have to chime in. Again, I'd like to see the field definition(s) for the fields you're trying to update.
Enjoy your vacation. I hope you have a great time!
I don't know how sleep works in VB6, but I would expect that it's the same across all languages in Windows. If that's the case, the sleep statement may not be doing what you are expecting. It will stop all actions in the program for the duration of the sleep. If the database engine is doing something, it may keep on going, but the grid won't be doing any updating during that time.
"sleep" was just something i was playing with back in 2004.. like i said i want to re-do / refresh this app as i now have reason to do so.. it's just been a LONG LONG time since i've touched this so.. in order for me to to give the example, i would have to makeup a new db without all the full info in it.. i'll get to that.. just need a couple of days as i just got back from vaca.. to be honest, i dunno why i even tried palying with "sleep".. but it was a long time ago so.. i just know atm, it works.. well, semi.. give me a few days and i'll post up the example.
I don't like how sleep works so I use this instead:
Code:
' Module Declarations
Public Declare Function GetTickCount Lib "kernel32" () As Long
Public Sub Sleep(ByRef msInterval As Long)
Dim nStart As Long
nStart = GetTickCount
Do While GetTickCount - msInterval < nStart
DoEvents
Loop
End Sub
Don't do that. What you have there is a spin wait, or busy wait. It causes the CPU to run flat out while doing nothing. A few years back, I ran a test where I compared the power consumption on a computer running a spin wait versus one that was just waiting. That thread is in the General Developer forum if you're interested. Basically, I could see a significant increase in power usage while the spin wait was operating, even with a pretty coarse measurement device. Spin waits will boost power usage, boost heat output from the computer, and have a few other negative impacts, all for nothing much.
However, if you want to do something like that, you can significantly boost the performance of the spin wait by adding some sleep statement in the loop. Sleeping for just 10ms every time through the loop will greatly reduce the strain on the CPU. Still not the best way to wait, but much better than a naked spin wait.
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandText = "select * from Table1 where cardset = '" & gCardSet & "' order by cardnumber*1"
'Can I have more than 1 of the above to call info from ANOTHER table in the DB????
Set rs = cmd.Execute
Dim i As Integer
Do While Not rs.EOF
i = i + 1
Grid1.Rows = i + 1
Grid1.RowHeight(i) = 500
Grid1.TextMatrix(i, 1) = rs!cardnumber
Grid1.TextMatrix(i, 2) = rs!Name
If Not IsNull(rs![Type 2]) Then
Grid1.TextMatrix(i, 4) = rs![Type 2]
End If
Grid1.TextMatrix(i, 5) = rs!rarity
Grid1.TextMatrix(i, 7) = "$" & rs!Value
Grid1.TextMatrix(i, 8) = rs!own
Grid1.TextMatrix(i, 9) = rs![type 1]
Grid1.TextMatrix(i, 10) = rs!PSA
Grid1.TextMatrix(i, 11) = rs!notes 'Hidden
rs.MoveNext
Loop
Label3(0).Caption = CStr(rs.RecordCount) 'This gives the amt of cards in the set'So, could i have Label3(1).caption to give the release date of the set from another table?
basically asked my question within the code.. so, ok.. i'm getting info i want in the MS FlexGrid and record count of said set.. however, i have another table that holds more info per generation and sets.. like what year a set was released.. sooo basically what i'm asking for is how do i call info from 2 different tables? my other table has a field called "Released" and in that column there are release dates for each set... ty
Last edited by elRuffsta; Apr 15th, 2024 at 01:24 PM.
Generally, that's done by joining the two tables, assuming you have fields that can join the table. You'd want to get away from *, if you do that, though * would still work after a fashion. The SQL would look something like this:
SELECT Table1.Field1, Table2.Field1, Table1.Field2...etc.
FROM Table1 INNER JOIN Table2 ON Table1.FieldX = Table2.FieldY
Joins can get quite complicated, especially when you join many different tables together. You also have LEFT JOINs (get any record from the left hand table and only matching records from the right hand table), RIGHT JOINs (the opposite of Left join, and fairly rare), and a few others. By far, the most common are the INNER and LEFT joins.
Beyond that, it comes down to the actual tables, how they relate, and what fields you want.
Don't do that. What you have there is a spin wait, or busy wait. It causes the CPU to run flat out while doing nothing. A few years back, I ran a test where I compared the power consumption on a computer running a spin wait versus one that was just waiting. That thread is in the General Developer forum if you're interested. Basically, I could see a significant increase in power usage while the spin wait was operating, even with a pretty coarse measurement device. Spin waits will boost power usage, boost heat output from the computer, and have a few other negative impacts, all for nothing much.
However, if you want to do something like that, you can significantly boost the performance of the spin wait by adding some sleep statement in the loop. Sleeping for just 10ms every time through the loop will greatly reduce the strain on the CPU. Still not the best way to wait, but much better than a naked spin wait.
Then I misunderstood how it works. I thought Doevents was giving control back to the system so it could do other things.
Generally, that's done by joining the two tables, assuming you have fields that can join the table. You'd want to get away from *, if you do that, though * would still work after a fashion. The SQL would look something like this:
SELECT Table1.Field1, Table2.Field1, Table1.Field2...etc.
FROM Table1 INNER JOIN Table2 ON Table1.FieldX = Table2.FieldY
Joins can get quite complicated, especially when you join many different tables together. You also have LEFT JOINs (get any record from the left hand table and only matching records from the right hand table), RIGHT JOINs (the opposite of Left join, and fairly rare), and a few others. By far, the most common are the INNER and LEFT joins.
Beyond that, it comes down to the actual tables, how they relate, and what fields you want.
seems complicated.. i just want to pull the RELEASE date on the set that is showing in the flexgrid from table 2 into label3(1).caption.. table 2 doesn't have anything else i really want to grab from it.. it's more a simple set info table.. release date, which generation the set belongs to and a couple of other things.. i just want the release date from table 2.
something like: in table 2 there is generation, cardset, Released, etc.. so whatever set is being displayed in the flexgrid the date will show in a label for that specific set
Code:
cmd.CommandText = "select * from Table2 where cardset = '" & gCardSet & "' Released"
'Now show that date in Label3(1).caption
* i changed "Set" to "CardSet" in the DB to match coding.. but not shown in picture as i didn't want to redo the image..
Last edited by elRuffsta; Apr 15th, 2024 at 04:13 PM.
what about just adding a NEW cmd? at the end of the current code???
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandText = "select * from Table2 where cardset = '" & gCardSet & "'Released"
'Can I have more than 1 of the above to call info from ANOTHER table in the DB????
Set rs = cmd.Execute
and so on?
*OR what about a private function and call the function at the end? just thinking out loud lol..
Last edited by elRuffsta; Apr 15th, 2024 at 08:32 PM.
Private Function ReleaseDate()
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandText = "select * from Table2 where cardset = '" & gCardSet & "' Released"
Set rs = cmd.Execute
yada yada yada
form2.label3(1).caption = DATE OF SET
End Function
i dunno.. just throwing it out there... this way i'm not joining tables and all that..
If both tables contain the same IDs then in theory you can do 2 queries and then fill the first column of the grid with the content of the first query and when finished fill column 2 with the content of the second query.
But when the IDs are the same then it should be possible to retrieve the data with a single query with a join query https://www.w3schools.com/sql/sql_join_left.asp
Code:
SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name = table2.column_name;
Then I misunderstood how it works. I thought Doevents was giving control back to the system so it could do other things.
Yes, mostly. Do Events pauses the currently executing code and lets the system pump any messages that are queued up. There may be some paints, timer ticks, and whatnot, waiting to be dealt with. Normally, those are all work, so the CPU doesn't rest during that time. Also, there often won't be any messages, so the program is essentially saying:
Are there any messages? No, ok, on we go...Are there any messages? No, ok, on we go...etc. It'll be ripping through that so fast that it won't slow down. If you watch the performance monitor, you might see one CPU core pegged for the duration. Back when we only had a single core, then the whole computer would be pegged. That's not quite the opposite to doing nothing. It's like the difference between sitting in a chair and running on a treadmill: In both cases, you won't get anywhere, but one takes a lot more effort.
k.. so, what i have on my desktop is 2 projects.. well.. both are 1 project.. i'm trying to combine them both into 1 as each is a different section of the same project.. what works with 1 db the other doesn't - each one has a similar DB but one is more enhanced.. so the ms flexgrid is messing up but works well with the simpiler version of the DB where i want it to work with the full enhanced DB.. so.. i guess i am gonna have re-do this whole thing from scratch.. not that i want to cause each side works but not with each other. keep in mind, i ORIGINALLY started this way back in 2004 and i have made adjustments since and most recently.
i'll get back to posting when i'm done re-designing / putting this altogether as 1 project as it suppossed to be... shaggy has suggested to me in making a demo to share publically with some simple tables and such without giving away my full DB and all - (as he is the only one i told what my project is / about), so that is what i'm gonna do.. ty for your patience.
Last edited by elRuffsta; Apr 17th, 2024 at 08:18 PM.
i only want certain things centered.. basically just 1 thing NOT centered.. how do i do this for each item below? so just the NAMES themselves are NOT centered... ty in advance
Code:
Option Explicit
Private Sub Form_Load()
'Setup the grid..
Grid1.ColWidth(0) = 600 'X & CHECKMARK image.....i want it centered
Grid1.ColWidth(1) = 400 'card number..........i want it centered
Grid1.ColWidth(2) = 2200 'card name.......................................i DON'T want the names centered - RED
Grid1.ColWidth(3) = 800 'Gender..................i want it centered
Grid1.ColWidth(4) = 800 'Type 1..................i want it centered
Grid1.ColWidth(5) = 800 'Type 2..................i want it centered
Grid1.ColWidth(6) = 2000 'Other..................i want it centered
Grid1.ColWidth(7) = 800 'rarity....................i want it centered
Grid1.ColWidth(8) = 800 'PSA.................... i want it centered
Grid1.ColWidth(9) = 1000 'value..................i want it centered
'i want all the column headers centered
Grid1.TextMatrix(0, 0) = "Own"
Grid1.TextMatrix(0, 1) = "#"
Grid1.TextMatrix(0, 2) = "Name"
Grid1.TextMatrix(0, 3) = "Gender"
Grid1.TextMatrix(0, 4) = "Type 1"
Grid1.TextMatrix(0, 5) = "Type 2"
Grid1.TextMatrix(0, 6) = "Other"
Grid1.TextMatrix(0, 7) = "Rarity"
Grid1.TextMatrix(0, 8) = "PSA"
Grid1.TextMatrix(0, 9) = "Value"
End Sub
Last edited by elRuffsta; Apr 29th, 2024 at 03:08 PM.
umm.. that's a FILL COLOR thread and such... that has nothing to do with specific aliging headers and specific fields that i am looking for.. please revisit my above code and picture.. each line should have a code to do what i want it to do.. or a block of code for those specific items. i'm not worried about colors.. i just colored it so it can be seen as what i want centered and what i don't want centered.
Last edited by elRuffsta; Apr 29th, 2024 at 03:49 PM.
Have you tried the sample in a new project and did this work for you?
If it did then something in your project is conflicting with your own code and/or properties
my entire code for that form atm.. so "how" is it conflicting? and yes, i did try it... again, ty.. but what you suggested ISN'T working for me.. again, each line has to have a specific code or a block of code to accomplish what i am trying to do.. i'm not here to debate.. but my code is clear as it sits... but ty anyways
Code:
Option Explicit
Private Sub Form_Load()
'Setup the grid..
Grid1.ColWidth(0) = 600 'X & CHECKMARK image.....i want it centered
Grid1.ColWidth(1) = 400 'card number.............i want it centered
Grid1.ColWidth(2) = 2200 'card name.......................................i DON'T want the names centered
Grid1.ColWidth(3) = 800 'Gender image..................i want it centered
Grid1.ColWidth(4) = 800 'Type 1 image..................i want it centered
Grid1.ColWidth(5) = 800 'Type 2 image..................i want it centered
Grid1.ColWidth(6) = 2000 'Other image...................i want it centered
Grid1.ColWidth(7) = 800 'rarity image.................i want it centered
Grid1.ColWidth(8) = 800 'PSA image.................... i want it centered
Grid1.ColWidth(9) = 1000 'dollar value..................i want it centered
'i want all the column headers centered
Grid1.TextMatrix(0, 0) = "Own"
Grid1.TextMatrix(0, 1) = "#"
Grid1.TextMatrix(0, 2) = "Name"
Grid1.TextMatrix(0, 3) = "Gender"
Grid1.TextMatrix(0, 4) = "Type 1"
Grid1.TextMatrix(0, 5) = "Type 2"
Grid1.TextMatrix(0, 6) = "Other"
Grid1.TextMatrix(0, 7) = "Rarity"
Grid1.TextMatrix(0, 8) = "PSA"
Grid1.TextMatrix(0, 9) = "Value"
End Sub
Private Sub mnuExit_Click()
Unload Me
End Sub
Private Sub mnuMainMenu_Click()
Unload Me
frmMain.Show vbModal
End Sub
Last edited by elRuffsta; Apr 30th, 2024 at 03:45 PM.
It's as clear as it is, but I see no code for aligning the values of the cells.
I took your code and my sample and merged them and it does work:
Code:
Option Explicit
Private Enum FGCellStyle
fgcsBackColor = 1
fgcsForeColor = 2
fgcsText = 3
fgcsTextStyle = 4
fgcsFontName = 5
fgcsFontBold = 6
fgcsFontItalic = 7
fgcsAllignment = 8
End Enum
Private Sub Form_Load()
Dim lCol As Long, lRow As Long
Grid1.Cols = 10
Grid1.Rows = 5
'Setup the grid..
Grid1.ColWidth(0) = 600 'X & CHECKMARK image.....i want it centered
Grid1.ColWidth(1) = 400 'card number.............i want it centered
Grid1.ColWidth(2) = 2200 'card name.......................................i DON'T want the names centered
Grid1.ColWidth(3) = 800 'Gender..................i want it centered
Grid1.ColWidth(4) = 800 'Type 1..................i want it centered
Grid1.ColWidth(5) = 800 'Type 2..................i want it centered
Grid1.ColWidth(6) = 2000 'Other...................i want it centered
Grid1.ColWidth(7) = 800 'rarity.................i want it centered
Grid1.ColWidth(8) = 800 'PSA.................... i want it centered
Grid1.ColWidth(9) = 1000 'value..................i want it centered
'i want all the column headers centered
Grid1.TextMatrix(0, 0) = "Own"
Grid1.TextMatrix(0, 1) = "#"
Grid1.TextMatrix(0, 2) = "Name"
Grid1.TextMatrix(0, 3) = "Gender"
Grid1.TextMatrix(0, 4) = "Type 1"
Grid1.TextMatrix(0, 5) = "Type 2"
Grid1.TextMatrix(0, 6) = "Other"
Grid1.TextMatrix(0, 7) = "Rarity"
Grid1.TextMatrix(0, 8) = "PSA"
Grid1.TextMatrix(0, 9) = "Value"
' Fill the grid with some bogus data
With Grid1
For lCol = 0 To .Cols - 1
For lRow = 1 To .Rows - 1
.TextMatrix(lRow, lCol) = "R" & CStr(lRow) & "C" & CStr(lCol)
Next
' All cells centered, expect the cells in column 2
If lCol = 2 Then
FG_Cell Grid1, fgcsAllignment, 0, lCol, .Rows - 1, .Cols - 1, flexAlignLeftCenter
Else
FG_Cell Grid1, fgcsAllignment, 0, lCol, .Rows - 1, .Cols - 1, flexAlignCenterCenter
End If
Next
End With
End Sub
Private Sub FG_Cell(FG As MSFlexGrid, ByVal What As FGCellStyle, Row1 As Long, Col1 As Long, Row2 As Long, Col2 As Long, Value As Variant)
Dim PrevRowCol(3) As Long ' to store the actual settings
Dim PrevFillStyle As Integer ' to store the actual settings
With FG
.Redraw = False
' Store current settings
PrevFillStyle = .FillStyle
PrevRowCol(0) = .Row: PrevRowCol(2) = .RowSel
PrevRowCol(1) = .Col: PrevRowCol(3) = .ColSel
' Set the range
.FillStyle = flexFillRepeat
.Row = Row1: .Col = Col1
.RowSel = Row2: .ColSel = Col2
' Apply changes
Select Case What
Case fgcsBackColor: .CellBackColor = Value
Case fgcsForeColor: .CellForeColor = Value
Case fgcsText: .Text = Value
Case fgcsTextStyle: .CellTextStyle = Value
Case fgcsFontName: .CellFontName = Value
Case fgcsFontBold: .CellFontBold = Value
Case fgcsFontItalic: .CellFontItalic = Value
Case fgcsAllignment: .CellAlignment = Value
End Select
' Restore settings
.FillStyle = PrevFillStyle
.Row = PrevRowCol(0): .Col = PrevRowCol(1)
.RowSel = PrevRowCol(2): .ColSel = PrevRowCol(3)
.Redraw = True
End With
End Sub
Now with a command button to add a new row instead of filling the grid in the form_load
Code:
Option Explicit
Private Enum FGCellStyle
fgcsBackColor = 1
fgcsForeColor = 2
fgcsText = 3
fgcsTextStyle = 4
fgcsFontName = 5
fgcsFontBold = 6
fgcsFontItalic = 7
fgcsAllignment = 8
End Enum
Private Sub Form_Load()
Dim lCol As Long, lRow As Long
Grid1.Cols = 10
Grid1.Rows = 1
'Setup the grid..
Grid1.ColWidth(0) = 600 'X & CHECKMARK image.....i want it centered
Grid1.ColWidth(1) = 400 'card number.............i want it centered
Grid1.ColWidth(2) = 2200 'card name.......................................i DON'T want the names centered
Grid1.ColWidth(3) = 800 'Gender..................i want it centered
Grid1.ColWidth(4) = 800 'Type 1..................i want it centered
Grid1.ColWidth(5) = 800 'Type 2..................i want it centered
Grid1.ColWidth(6) = 2000 'Other...................i want it centered
Grid1.ColWidth(7) = 800 'rarity.................i want it centered
Grid1.ColWidth(8) = 800 'PSA.................... i want it centered
Grid1.ColWidth(9) = 1000 'value..................i want it centered
'i want all the column headers centered
Grid1.TextMatrix(0, 0) = "Own"
Grid1.TextMatrix(0, 1) = "#"
Grid1.TextMatrix(0, 2) = "Name"
Grid1.TextMatrix(0, 3) = "Gender"
Grid1.TextMatrix(0, 4) = "Type 1"
Grid1.TextMatrix(0, 5) = "Type 2"
Grid1.TextMatrix(0, 6) = "Other"
Grid1.TextMatrix(0, 7) = "Rarity"
Grid1.TextMatrix(0, 8) = "PSA"
Grid1.TextMatrix(0, 9) = "Value"
' Set the default alignment for the complete columns
For lCol = 0 To Grid1.Cols - 1
Select Case lCol
Case 2: Grid1.ColAlignment(lCol) = flexAlignLeftCenter
Case Else: Grid1.ColAlignment(lCol) = flexAlignCenterCenter
End Select
Next lCol
' Overrule the aligment for the headers, the should be centered
FG_Cell Grid1, fgcsAllignment, 0, 0, 0, Grid1.Cols - 1, flexAlignCenterCenter
End Sub
Private Sub Command1_Click()
Dim lRow As Long, lCol As Long
' Fill the grid with some bogus data
With Grid1
lRow = .Rows: .Rows = .Rows + 1
For lCol = 0 To .Cols - 1
.TextMatrix(lRow, lCol) = "R" & CStr(lRow) & "C" & CStr(lCol)
Next
End With
End Sub
Private Sub FG_Cell(FG As MSFlexGrid, ByVal What As FGCellStyle, Row1 As Long, Col1 As Long, Row2 As Long, Col2 As Long, Value As Variant)
Dim PrevRowCol(3) As Long ' to store the actual settings
Dim PrevFillStyle As Integer ' to store the actual settings
With FG
.Redraw = False
' Store current settings
PrevFillStyle = .FillStyle
PrevRowCol(0) = .Row: PrevRowCol(2) = .RowSel
PrevRowCol(1) = .Col: PrevRowCol(3) = .ColSel
' Set the range
.FillStyle = flexFillRepeat
.Row = Row1: .Col = Col1
.RowSel = Row2: .ColSel = Col2
' Apply changes
Select Case What
Case fgcsBackColor: .CellBackColor = Value
Case fgcsForeColor: .CellForeColor = Value
Case fgcsText: .Text = Value
Case fgcsTextStyle: .CellTextStyle = Value
Case fgcsFontName: .CellFontName = Value
Case fgcsFontBold: .CellFontBold = Value
Case fgcsFontItalic: .CellFontItalic = Value
Case fgcsAllignment: .CellAlignment = Value
End Select
' Restore settings
.FillStyle = PrevFillStyle
.Row = PrevRowCol(0): .Col = PrevRowCol(1)
.RowSel = PrevRowCol(2): .ColSel = PrevRowCol(3)
.Redraw = True
End With
End Sub
Last edited by Arnoutdv; Apr 30th, 2024 at 01:35 AM.
ty, i'll try it out in a bit.. i wasn't expecting such a chunk of code.. i thought it would be a lot smaller
also, i won't be adding anymore rows
ok, i dunno why it's making rows and filling them... this will be reading from a database so the rows will eventually be made and filled automatically.. also, how do i center the column HEADER for "NAME", but not list the names in the center? or is it that it cannot be done by default the whole column becomes centered? can we stop it from creating the extra 3 rows and filling them - as it will be reading from a DB?
ahh.. i see why it's making and filling rows.. well filling them, haven't figured out why / how it's adding 3 more rows tho...
Code:
' Fill the grid with some bogus data
.TextMatrix(lRow, lCol) = "R" & CStr(lRow) & "C" & CStr(lCol) 'yeah, this is where it's gonna read from a DB
Last edited by elRuffsta; Apr 30th, 2024 at 06:13 PM.