PDA

Click to See Complete Forum and Search --> : Martys thread...


NoteMe
Dec 20th, 2004, 04:40 PM
I can't get into it...it gives me a blank page??? :confused:

NoteMe
Dec 20th, 2004, 04:42 PM
http://noteme.com/images/marty.jpg

MartinLiss
Dec 20th, 2004, 04:45 PM
Yes, Houston we have a problem.

NotLKH
Dec 20th, 2004, 05:12 PM
Looks so promising, from what little I can see...


Private Sub Form_Load()

' Create the instance of the database class
Set gDB = New CDatabase

' Open the database
gDB.dbName = App.Path & "\northwind.MDB"

' Create an...

NotLKH
Dec 20th, 2004, 05:16 PM
AhA!

There we go:





Problem with NewVBCode Tags

Private Sub Form_Load()

' Create the instance of the database class
Set gDB = New CDatabase

' Open the database
gDB.dbName = App.Path & "\northwind.MDB"

' Create an object variable for the ColumnHeader object.
Dim clmX As ColumnHeader
' Add ColumnHeaders.
Set clmX = lvFind.ColumnHeaders.Add(, , "Product", (lvFind.Width - 1066) / 2)
Set clmX = lvFind.ColumnHeaders.Add(, , "Supplier ID", (lvFind.Width - 1066) / 2)
Set clmX = lvFind.ColumnHeaders.Add(, , "Category ID", 976)

lvFind.BorderStyle = ccFixedSingle ' Set BorderStyle property.
lvFind.View = lvwReport ' Set View property to Report.

' Label OptionButton controls with SortOrder options.
OptSort(0).Caption = "Sort Ascending"
OptSort(1).Caption = "Sort Descending"
lvFind.SortOrder = lvwAscending ' Sort ascending.
OptSort(0).Value = True

End Sub

Private Sub lvFind_ColumnClick(ByVal ColumnHeader As ColumnHeader)
' When a ColumnHeader object is clicked, the ListView control is
' sorted by the subitems of that column.
' Set the SortKey to the Index of the ColumnHeader - 1
lvFind.SortKey = ColumnHeader.Index - 1
' Set Sorted to True to sort the list.
lvFind.Sorted = True
End Sub
Private Sub Form_Activate()

txtWord.SetFocus

End Sub
Private Sub Form_Unload(Cancel As Integer)

Set frmFind = Nothing

End Sub
Private Sub lvFind_DblClick()

cmdFind(findCloseButton) = True

End Sub
Private Sub cmdFind_Click(Index As Integer)

Dim sSQLProducts As String
Dim sErr As String
Dim itmX As ListItem ' Create a variable to add ListItem objects.

Select Case Index
Case findFindItButton
On Error Resume Next
lvFind.ListItems.Clear
sSQLProducts = "Select * from Products where ProductName like '*" & txtWord & "*' "
Set mrsProducts = gDB.DB.OpenRecordset(sSQLProducts, dbOpenDynaset)
If Err.Number <> 0 Then
sErr = Err.Description
On Error GoTo 0
Err.Raise dbOpenRSError, "cmdFind_Click", sErr
End If

While Not mrsProducts.EOF
Set itmX = lvFind.ListItems.Add(, , CStr(mrsProducts!ProductName))
itmX.SubItems(1) = CStr(mrsProducts!SupplierID)
itmX.SubItems(2) = mrsProducts!CategoryID
mrsProducts.MoveNext
Wend
mrsProducts.Close

Case findCloseButton
Unload Me
Case Else
ColorListviewRow lvFind, 5, vbRed ' use 16711681 instead of vbBlue
End Select

End Sub
:wave:

NotLKH
Dec 20th, 2004, 05:20 PM
Hmmm.

It now allows me in normally, not just via view printable format.



http://www.vbforums.com/showthread.php?t=317100

MartinLiss
Dec 20th, 2004, 05:35 PM
It's been determined that it is a problem with comments (') and the responsible tech is aware of it.