HELP with VB....pleez 
Author Message
 HELP with VB....pleez

If anyone would have a few minutes to look over the attached code, and let
me know what I am doing wrong with the code for the "Show Info" button
(click event) on frmMain.  I keep getting errors ranging from "no current
record" to "The action was cancelled by an associated object", depending on
whether I have the "data1.recordset.movefirst" remmed out or not.  I am a
newbie, so please don't be too {*filter*} me.

Thanx


--
Well, It's gotta be Noon somewhere!
begin 600 prog.zip
<uuencoded_portion_removed>
D8 ``4')O:C$P8RYV8G!02P4&`````!0`% !V! ``FF(`````
`
end



Sun, 24 Oct 1999 03:00:00 GMT  
 HELP with VB....pleez

Private Sub cmdShowAll_Click()
    lstMovies.Clear

    Do While Not Data1.Recordset.EOF
        lstMovies.AddItem Data1.Recordset.Fields("Title").Value
        Data1.Recordset.MoveNext
    Loop

    Data1.Recordset.MoveFirst
End Sub

Private Sub cmdViewInfo_Click()

    Let strsearchfor = lstMovies.Text

    frmMain.Hide
    frmInfo.Show
    Let intfound = 0

    Do While intfound = 0 And Not Data1.Recordset.EOF
        '//                                  ("Titles") <= wrong
        If Data1.Recordset.Fields("Title").Value = strsearchfor Then
            Let intfound = 1
        Else
            Data1.Recordset.MoveNext
        End If
    Loop

    Data1.Recordset.MoveFirst

    If intfound = 0 Then
       MsgBox "no record"
    Else
        frmInfo.picInfo.Print strsearchfor
    End If

End Sub



Sun, 24 Oct 1999 03:00:00 GMT  
 HELP with VB....pleez

I found a few mistakes and corrected.

// in your frmMain

Private Sub cmdViewInfo_Click()

    Let strsearchfor = lstMovies.Text

    frmMain.Hide
    frmInfo.Show
    Let intfound = 0

    Do While intfound = 0 And Not Data1.Recordset.EOF
        '//                                  ("Titles") <= wrong
        If Data1.Recordset.Fields("Title").Value = strsearchfor Then
            Let intfound = 1
        Else
            Data1.Recordset.MoveNext
        End If
    Loop

    Data1.Recordset.MoveFirst

    If intfound = 0 Then
       MsgBox "no record"
    Else
        frmInfo.picInfo.Print strsearchfor
    End If

End Sub



Sun, 24 Oct 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. I am stupid but pleez help me

2. MDI child reference HELP PLEEZ

3. I wnat to make a chat software, but new.pleez help

4. I am RILLY thick so pleez don't bother replying to this message :)

5. HELP HELP HELP Set document name of print job from VB HELP HELP HELP

6. DAO-Specific Help not available in Access 2000 Help (VB Help)

7. HELP HELP HELP with VB/DOS

8. VB 3.0 and FoxPro Help Help Help

9. vb ==> access HELP HELP HELP

10. help,help,help,help,help,help,help,help,help,help,help,help,help,

11. HELP HELP HELP w/ VB ListBox Control

12. BMP's for VB 4.0 toolbar help help help

 

 
Powered by phpBB® Forum Software