My ColIndexes are all fine.....when i have... For R = 0 To grid.Rows - 1....it sums fine but will give me the error when there are no records showing in the grid.....when i change it to... For R = 0 To grid.Rows 0 - 1...it shows "0" when there are no records displayed in the...
I have a function that totals columns from a grid and displays the amounts in a textbox....it works great when there are records found but if the user clicks on the "total" button with no records i get the error "subscript out of range"...i want it to display...
The first issue is solved.....THANKS... as for the second issue....it works but now it won't sum....basically....i have 4 textboxes that grabs totals from a Grid with 4 corresponding buttons....my last button sums all the totals into a grand total into a label...it works with my previous code...
...Agent Name", "Search")
b = InputBox("Enter Date as MM-DD-YY", "Search")
strSQL = "SELECT * FROM tracker where aname = '" & a & "' and date = '" & b & "'"
If a = "" And b = "" Then
MsgBox "You must...
...Dim strFile As String
Dim strSQL As String
strFile = "a:\tracker"
InputBox "Enter Agent Name"
strSQL = "SELECT * FROM tracker where aname = '" & combo5.Text & "' and date = '" & Text2.Text & "'"
Set db = OpenDatabase(strFile)
Set rs =...
It formats it ok.....but now it won't sum the textbox amounts into my label......
here is part my code.....any suggestions?
Private Sub Command22_Click()
Text1.Text = TotalColumn(MSFlexGrid1, 12)
Dim amount As Single
amount = Text1.Text
Text1.Text = Format(amount, "currency")
End...
How do i default a textbox and or Label to show a $ value when a calculation is perofmed? Curretn;y just the number appears but i want it to be shown in dollars. Can anyone suggest anything?
Thanks Will but I already have it grouped by name and date with these sql statements...
'under my combo5_change
Select * from tracker where aname = ' " &combo5.text &" ' and date = ' " &text2.text& " ' "
'under my Text2_change
Select * from tracker where date = '...
...each day...it seems to be appearing in random order....is their anyway to group by name and date but in alphabetical order?
i tried "select * from tracker group by aname asc, date asc" but it goves me an error of "syntax in group by clause"
as you can see....i need...
...Dim db As Database
Dim rs As Recordset
Dim strFile As String
Dim strSQL As String
strFile = "a:\tracker"
strSQL = "SELECT * FROM tracker where aname = '" & combo5.Text & "' and date = '" & Text2.Text & "'"
Set db = OpenDatabase(strFile)
Set rs =...
I have an MSFlexgrid that displays records based on Names and Dates. I was just wondering if there is anyway the user can view or scroll through each set by alphaetical order. Also, does anyone know how the records in MSFlexgrid are arranged?
here is my code...
Public Function...
it was actually my TotalColumn = Total....i misspelled "column"....working good....but now i'm sometimes getting "Overflow" error...looks like the number might be too large...any suggestions?
Thanks for the help but it doesn't seem to be working....it gives me the error "Compile Error: ByRef argument type mismatch" ....what does that mean?"
Private Sub Command22_Click()
Text1.Text = TotalColumn(FlexGrid, 15) ' 15 is my column i would...
Season's greetings all!!
Just wondering how i would create a function to sum a column in a MSFlexGrid? I wanted to have a coomadnbutton to perform the function and a textbox to display it. Is this possible and can anyone help?
simon
Mike:
Nothing seems to happening..this is what i have:
"comb1 is where the prod codes are and text8 is where the dollar amount should be entered
'check value against a list of values requiring a dollar amount
'return True if dollar amnt is required, false if not
Function...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.