I've change it and it works but it only save 1 itemdata instead of 5.
Do i need to make a looping? but how?...
User Profile
Collapse
-
Dear Mr. Rey Sean,
Thanks for your reply, but it doesn't make any change, because what i want to validate is it msflexgrid of colums(3)....Leave a comment:
-
it's to complicated, isnt it? =(
i've tried to change the validation so it will be : only save the cols(3) that is not NULL.
[CODE=vb]If cboSales.Text = "" Then
MsgBox "Choose Sales No!"
Else
With rs
.ActiveConnecti on = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=salesdb. mdb;Persist Security Info=False"
.CursorLocation = adUseClient...Leave a comment:
-
There are 4 columns in the grid.
Col:
1 -> Item's id
2 -> Item's name
3 -> Qty
4 -> "b" as checkbox
Yup i had declared "i" as integer.
Table structure:
1. SO_No
2. PO_No
3. Date
4. CustomerID
5. ItemID
6. QtyLeave a comment:
-
Dear Ms. Veena,
i've remove PK from Sales table, and i dont use any PK for now.
but when i run the program it still has the same problem.
it only save the first row item data and then "subscript out of range".Leave a comment:
-
-
-
There are 5 rows in the grid.
And as for note when the grid consist of 1 item data only (then it become 1 row only), the script works very well.
It will show "subscript out of range" when there are more than 1 itemdata (row).
I've tried the code and it still save first row itemdata only (while there are 5 itemdata) *sad*...Leave a comment:
-
It works!!!
Unbelieveable!!
You're really great, Ms. Veena =))
I was stucked with the parameters and you came up with formulas.. I never think of that way before...
Thank you so much for your help........... ...
=))...Leave a comment:
-
I've made a changed and it still show an error "Subscript out of range".
When i pressed on debug button,
it highlighted this part.
If MSFlexGrid1.Tex tMatrix(i, 4) = "b" Then
and still only the first row's item being saved.Leave a comment:
-
Dear Ms. Veena and other experts,
I was trying to save the content of Msflexgrid for all rows that have the "b" value.
[CODE=vb]If cboSales.Text = "" Then
MsgBox "Choose Sales No!"
Else
With rs
.ActiveConnecti on = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=salesdb. mdb;Persist Security Info=False"
.CursorLocation = adUseClient...Leave a comment:
-
I need to pass the parameters to CR to show the picked month and year to the report.
But because of that code, the report doesnt show correctly.Leave a comment:
-
Yup, that's where i put the comments on.
because of that parameters, the report cant show the currently picked month =(...Leave a comment:
-
I made it like this:
[CODE=vb]
Dim m_Report As CRAXDDRT.report
Dim m_Application As New CRAXDDRT.Applic ation
Set m_Report = Nothing
Set m_Report = m_Application.O penReport(App.P ath + "Report.rpt ", 1)
m_Report.Record SelectionFormul a = "Month ({SALES.DATE}) =" & Val(cboMonth.Te xt) & " And Year ({SALES.DATE}) =" & Val(cboYear.Tex t)
...Leave a comment:
-
Thanks Ms. Veena =)
Can i add year as well to that code?
Maybe like this?
Code:.RecordSelectionFormula = "Month ({SALES.DATE}) =" & Val(cboMonth.Text) And "Year ({SALES.DATE}) =" & cboYear.Text
Leave a comment:
-
they are 1 to 12
what i mean is 1 refers to January, and so onLeave a comment:
-
it wont work because my Sales.Date format is dd/mm/yyyy
do i need to convert it first?
thanks...Leave a comment:
-
Monthly report
I'm kinda stuck of making this
Code:Report1.RecordSelectionFormula = "{Sales.Date} In (" & Format(cboMonth.Text, "MMMM") & ")"
im using vb6 and ms access and CR as for report
do i miss anything? -
-
Validate msflexgrid's cells
Just another msflexgrid's topic..
does anyone know how to validate the cell from msflexgrid?
for example i want to validate the column(3) if it's not numeric (after editing) then it would disable moving to other cells until it completely fulfill the condition.
Here's my code
Code:Private Sub MSFlexGrid1_LeaveCell() For i = 1 To MSFlexGrid1.Rows - 2 If IsNumeric(MSFlexGrid1.TextMatrix(i,
No activity results to display
Show More
Leave a comment: