Microsoft
Software
Hardware
Network
Question : Array Help
I have an array that gets populated from a datatable.
The problem I am facing, I need the array to have increments of 4.
If the datatable only has 2 records, I need to pad the array with 2 additional positions.
If the datatable only has 13 records, I need to pad the array with 3 additional etc. etc.
Any thoughts.
Code Snippet:
1:
arrToLabels(i) = "To:" + DtSet.Tables(0).Rows(i).Item(0) + "-" + DtSet.Tables(0).Rows(i).Item(1)
Open in New Window
Select All
Answer : Array Help
If DtSet.Tables(0).Rows / 4 = 0 Then
arrSize = DtSet.Tables(0).Rows
Else
arrSize = DtSet.Tables(0).Rows + (4 - (DtSet.Tables(0).Rows Mod 4))
End If
Random Solutions
MS Access XP Report shows no "Print Custom Size" y?
Access 2007 Slow on Subforms
Redirect websites on SBS 2003
Counting the number of time an item occurs with another event
How do I access another column of data in a ComboBox?
Certreq in Windows 2003 Server (Certificate Authority)
Dropdown of Word 2003, Insert Autotext subfolders are all empty
How do I allow access to certain websites only?
SBS08 - RWW - FQDN - Can't Get it to Work?
Date field on form show Number sign