Вы находитесь на странице: 1из 19

End SubPrivate Sub Show_Existing(v SQL As String)Dim vLst As ListItemlstExisti ng.ListItems.

Cle ar With

dtaDB.RecordSo urce = vSQL.RefreshWi th .RecordsetIf .BOF = True Then Exit Sub.MoveFirstW hile Not .EOFSet vLst =

lstExisting.ListIt ems.Add(, , !ID)vLst.SubIte ms(1) = !LastNamevLst.S ubItems(2) = !FirstNamevLst. SubItems(3) = !MivLst.SubItem

s(4) = !AddressvLst.Su bItems(5) = !TelNum.MoveN extWendEnd WithEnd With lblCnt = "# of Records : " & lstExisting.ListIt

ems.CountlstExis ting.RefreshlstEx isting.RefreshEn d SubPrivate Sub lstExisting_Click ()Dim vI As Integer If lstExisting.ListIt ems.Count = 0

Then Exit Sub Call Default_Obj cmd EditUpdate.Enab led = TruecmdDelete.E nabled = True vI = lstExisting.Select

edItem.IndexvID = lstExisting.Select edItem txtLastName = lstExisting.ListIt ems(vI).ListSubI tems(1)txtFirstN ame =

lstExisting.ListIt ems(vI).ListSubI tems(2)txtMI = lstExisting.ListIt ems(vI).ListSubI tems(3)txtHome Address = lstExisting.ListIt ems(vI).ListSubI

tems(4)txtTelNu m= lstExisting.ListIt ems(vI).ListSubI tems(5)End SubPrivate Sub txtSearchKey_C hange()Dim vSQL As

StringSelect Case cboSearchBy.Te xtCase "Last Name"vSQL = "SELECT * FROM DirectoryList WHERE

LastName LIKE '" & txtSearchKey& "*'"Case "First Name"vSQL = "SELECT * FROM DirectoryList WHERE

FirstName LIKE '" & txtSearchKey& "*'"Case "M.I."vSQL = "SELECT * FROM DirectoryList WHERE MI

LIKE '" & txtSearchKey & "*'"Case "Home Address"vSQL = "SELECT * FROM DirectoryList WHERE Address LIKE '"

& txtSearchKey &"*'"Case "Telephone #"vSQL = "SELECT * FROM DirectoryList WHERE TelNum LIKE '"

& txtSearchKey &"*'"End Select Call Show_Existing(v SQL)End Sub

THE DATABASE

Leave a Comment

Submit Characters: 400

PriyangiPatel

jaypujara007@gmail.com 07 / 09 / 2010 06 / 15 / 2010This document made it onto the Rising List!

Documentation (vb project)


Download or Print 2,840 Reads

Uploaded by ankush_drudedude9962 Follow Download


TIP Press Ctrl-F to quickly search anywhere in the document.

50 p. Study of Telecommunication Network, Consumer Behaviour

57 p. Project After Sales Services Vediocon full fledged marketing project

39 p. Documentation (vb project)

Follow Us! scribd.com/scribd twitter.com/scribd facebook.com/scribd About Press Blog Partners Scribd 101 Web Stuff Support FAQ Developers / API Jobs Terms Copyright Privacy

Вам также может понравиться