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
Access VBA - Need to wait a few seconds...
Take some of the data from cursor to a variable
ATL COM compilation error in atlcom.h
How to call a sub in a seperate class file
Visual Studio SQL Best Practices
Access - Forms - Maximum number of Fiels
how to skip tempdb in SP_MSFOREACHTABLE and SP_SPACEUSED
How do I push out customized header/footer templates in Word 2007
How do you create ODBC in VBA to retrieve a text file from remote server then populate access table?
Outlook user can replay to internal email, but not send new email