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
how to change multiple check box in query
Timer function to automate Access
Extract data from XML using sql server 2005Question
Access project - How to undo changes in a continuous form
Access 2003 NOT IN (select subquery) doesn't work
How to copy all the Children of an InkCanvas to another inkCanvas
How do I get rid of double contacts in Outlook?
Allowing earlier dates in datetime picker control than 1753
Trigger on record insert
uninstall 2008 sql server