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!
Private Function SearchNames(txtSearch As String) As Boolean
On Error GoTo ERROR_LINE
Dim bReturn As Boolean
Dim sSql As String
Set con = New ADODB.Connection
Set rs = New ADODB.Recordset
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Agemast.mdb"
sSql = "SELECT Agemast.AcctNo FROM Agemast" 'ORDER BY AcctNo
sSql = sSql & "WHERE AcctNo like '" & txtSearch & "' "
sSql = sSql & "ORDER BY AcctNo"
lvw.ListItems.Clear
Dim xList As ListItem
lvw.ListItems.Clear
If con.State = adStateOpen Then
rs.Open sSql, con, adOpenForwardOnly
Do While Not rs.EOF 'habang wala pa sa dulo
Do While Not rsADO.EOF 'habang wala pa sa dulo
Set xList = lvw.ListItems.Add(, , Trim(rs("AcctNo")))
xList.SubItems(1) = Trim(StrConv(rs("CustomerName"), vbProperCase))
xList.SubItems(2) = Trim(rs("DRDate"))
xList.SubItems(3) = "Php" & Trim(Format(rs("TotalPenalty"), "#,##0.00"))
xList.Tag = rs("AcctNo")
rs.MoveNext
Loop
If lvw.ListItems.Count <> 0 Then
lvw.SetFocus
Else
txtSearch.SetFocus
txtSearch.SelStart = 0
txtSearch.SelLength = Len(txtSearch.Text)
End If
Else
Err.Raise vbObjectError + 513, ERR_CAN_NOT_OPEN_CONNECTION
End If
bReturn = True
EXIT_FUNCTION:
SearchNames = bReturn
Set rs = Nothing
con.Close
Set con = Nothing
Exit Function
ERROR_LINE:
MsgBox Err.Description
bReturn = False
Resume EXIT_FUNCTION
End Function
Private Sub cmdSearch_Click()
Dim itm As MSComctlLib.ListItem
Set itm = lvw.FindItem(txtSearch.Text, lvwSubItem, , lvwPartial)
'for partial search use this:
'**Set itm = ListView1.FindItem("partial text goes here", lvwSubItem, , lvwPartial)
If Not itm Is Nothing Then
itm.EnsureVisible
itm.Selected = True
lvw.SetFocus
End If
Ens Sub
Mga boss, pahelp naman. My "Sytax Error in FROM clause" daw eh.
Yung Dbase ko is agemast.mdb at may table na agemast with fields: Acct, CustomerName, DRDate, TPenalty
sSql = "SELECT Agemast.AcctNo FROM Agemast" 'ORDER BY AcctNo
sSql = sSql & "WHERE AcctNo like '" & txtSearch & "' "
sSql = sSql & "ORDER BY AcctNo"
Walang space between "Agemast" at "WHERE" mo kaya error in FROM clause
Lage ka maglalagay ng space sa simula or sa dulo para sure like this
sSql = " SELECT Agemast.AcctNo FROM Agemast" 'ORDER BY AcctNo
sSql = sSql & " WHERE AcctNo like '" & txtSearch & "' "
sSql = sSql & " ORDER BY AcctNo"
- - - Updated - - -
mga pards pahelp naman po kung pano maindicate ung days sa textbox base sa calendar na maconsume ng customer..tnx
View attachment 961110
link po ng visual studio 2013 kung san pwde ma i download salamat po
1000 VISUAL BASIC6 source codes of programs.
File size: 60.32 MB
Code:http://www.mediafire.com/download/ayb4hcjxzej/1000_Visual_Basic_Source_Code.rar