- Messages
- 50
- Reaction score
- 2
- Points
- 28
Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.
All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!
paano ba kunin ung item na nasa listbox? at ilagay sa variable I mean ilalagay ko kasi siya na value ng combobox .. thx .. nasa column 3 at 4 kasi siya eh see pix
/View attachment 766671
If ListView1.SelectedIndices.Count <= 0 Then
Return
End If
Dim myData = ListView1.SelectedIndices(0)
If myData>= 0 Then
combobox1.items.add(ListView1.Items(myData).SubItems(2).Text)
combobox2.items.add(ListView1.Items(myData).SubItems(3).Text)
End If
paano ba kunin ung item na nasa listbox? at ilagay sa variable I mean ilalagay ko kasi siya na value ng combobox .. thx .. nasa column 3 at 4 kasi siya eh see pix
/View attachment 766671
combobox1.selectedtext = listView.SelectedItems(0).SubItems(1).Text
where subitems is the column, palitan mo nalang ang 1
Do you mean ListView not ListBox? ListView yan dba.
Try mo to kung gagana:
Under ListView_MouseDoubleClick event . .
Code:If ListView1.SelectedIndices.Count <= 0 Then Return End If Dim myData = ListView1.SelectedIndices(0) If myData>= 0 Then combobox1.items.add(ListView1.Items(myData).SubItems(2).Text) combobox2.items.add(ListView1.Items(myData).SubItems(3).Text) End If
mga boss panu po ba ang tamang code para pag maximize mo ang isang form ay pati button niya at lahat ng content ay nasa tamang lalagyan??pahelp po...
meron po bang framework na pang design sa components ng vb.net?, yung mga buttons, tabs, windows.. pero iba ang design nd yung default lng?..,, kumbaga sa web parang jqwidget, dhtmlx ganun..
CheckForIllegalCrossThreadCalls = False
Cross-thread operation not valid: Control 'lblLoading' accessed from a thread other than the thread it was created on.
If DataRead.HasRows Then
lblLoading.Visible = FalseEnd If
While DataRead.Read
countitem += 1End While
If ListView2.InvokeRequired Then
ListView2.Items.Add(Trim(DataRead(0).ToString))End If
ListView2.Items.Add(Trim(DataRead(0).ToString))
ListView2.Items(ListView2.Items.Count - 1).SubItems.Add(Trim(DataRead(1).ToString))
ListView2.Items(ListView2.Items.Count - 1).SubItems.Add(Trim(Format(DataRead(2), "yyyy-MM-dd")))
lblItem.Visible = True
lblItem.Text = countitem & " Item/s"
Private Function Update_Record() As Boolean
Dim STRSQL As String
Dim iStatus As Integer
Dim dateOnly As Date
dateOnly = format(dtp1.Value, DATEFORMAT)
If optApprvd.Value Then
iStatus = 1
Else
iStatus = 0
End If
sComma = Chr(44)
sSpace = Chr(32)
Dim intLoopIndex As Integer
Dim sList As Variant
For intLoopIndex = 0 To List1.ListCount - 1
sList = sList & List1.List(intLoopIndex) & sComma & sSpace
Next intLoopIndex
On Error GoTo errHandler
STRSQL = "UPDATE " & APPROVAL & " SET site_id= '" & txtSite.Text & "' ," & _
"date_survey='" & txtDateSurvey.Text & "' ," & _
"loginname= '" & txtUserName.Text & "'," & _
"date_approved= '" & dateOnly & "' ," & _
"approval_status= " & CInt(iStatus) & "," & _
"remarks= '" & sList & "' " & _
"WHERE " & _
"site_id='" & txtSite.Text & "' AND date_survey='" & txtDateSurvey.Text & "'"
Debug.Print STRSQL
gConnect1.BeginTrans
Update_Record = True
gConnect1.Execute STRSQL
MsgBox "Check and Approval Information was Updated!", vbInformation
Exit Function
errHandler:
MsgBox Err.description
Update_Record = False
End Function
eto yung VALUE NG STRSQL KO!
[question]
bakit po hindi nalang gumamit ng adodb dito?
mas madali din naman po?
what is their difference?
Patingin nga mga boss kung anong kulang?
Code:Private Function Update_Record() As Boolean Dim STRSQL As String Dim iStatus As Integer Dim dateOnly As Date dateOnly = format(dtp1.Value, DATEFORMAT) If optApprvd.Value Then iStatus = 1 Else iStatus = 0 End If sComma = Chr(44) sSpace = Chr(32) Dim intLoopIndex As Integer Dim sList As Variant For intLoopIndex = 0 To List1.ListCount - 1 sList = sList & List1.List(intLoopIndex) & sComma & sSpace Next intLoopIndex On Error GoTo errHandler STRSQL = "UPDATE " & APPROVAL & " SET site_id= '" & txtSite.Text & "' ," & _ "date_survey='" & txtDateSurvey.Text & "' ," & _ "loginname= '" & txtUserName.Text & "'," & _ "date_approved= '" & dateOnly & "' ," & _ "approval_status= " & CInt(iStatus) & "," & _ "remarks= '" & sList & "' " & _ "WHERE " & _ "site_id='" & txtSite.Text & "' AND date_survey='" & txtDateSurvey.Text & "'" Debug.Print STRSQL gConnect1.BeginTrans Update_Record = True gConnect1.Execute STRSQL MsgBox "Check and Approval Information was Updated!", vbInformation Exit Function errHandler: MsgBox Err.description Update_Record = False End Function
thx mga ka SYMB .
Patingin nga mga boss kung anong kulang?
Code:Private Function Update_Record() As Boolean Dim STRSQL As String Dim iStatus As Integer Dim dateOnly As Date dateOnly = format(dtp1.Value, DATEFORMAT) If optApprvd.Value Then iStatus = 1 Else iStatus = 0 End If sComma = Chr(44) sSpace = Chr(32) Dim intLoopIndex As Integer Dim sList As Variant For intLoopIndex = 0 To List1.ListCount - 1 sList = sList & List1.List(intLoopIndex) & sComma & sSpace Next intLoopIndex On Error GoTo errHandler STRSQL = "UPDATE " & APPROVAL & " SET site_id= '" & txtSite.Text & "' ," & _ "date_survey='" & txtDateSurvey.Text & "' ," & _ "loginname= '" & txtUserName.Text & "'," & _ "date_approved= '" & dateOnly & "' ," & _ "approval_status= " & CInt(iStatus) & "," & _ "remarks= '" & sList & "' " & _ "WHERE " & _ "site_id='" & txtSite.Text & "' AND date_survey='" & txtDateSurvey.Text & "'" Debug.Print STRSQL gConnect1.BeginTrans Update_Record = True gConnect1.Execute STRSQL MsgBox "Check and Approval Information was Updated!", vbInformation Exit Function errHandler: MsgBox Err.description Update_Record = False End Function
thx mga ka SYMB .
ado.net na kasi luma na ang adodb
asan ang connection string mo? and command?
STRSQL = " SELECT g.date_approved, (a.hour_from + " - " + a.hour_to) AS hour, g.site_id, g.date_survey, b.volume as cnt, e.vehicle_type, g.remarks FROM " & APPROVAL & "g ," & SURVHEADERS_1 & " a, " & SURVDETAILS_1 & " b , " & VEHICLE_TYPES & " e " & _
" WHERE a.header_no=b.header_no AND a.site_id = g.site_id AND e.vehicle_type = b.vehicle_type " & _
" UNION ALL " & _
" SELECT g.date_approved, (c.hour_from + " - " + c.hour_to) AS hour, g.site_id,g.date_survey, (isnull(d.volume_inc_post,0 ) + isnull(d.volume_dec_post,0)) as cnt, f.vehicle_type, g.remarks FROM " & APPROVAL & "h ," & SURVHEADERS_2 & "c, " & SURVDETAILS_2 & " d , " & VEHICLE_TYPES & " f " & _
" WHERE c.header_no=d.header_no AND c.site_id = h.site_id AND f.vehicle_type = d.vehicle_type"
'" ORDER BY hour"