why i am getting the following error in VB6.0?

hi, i was just practicing my holiday assignment in vb6.0 i wrote an application which connect MS-ACCESS i connected it to default table biblie (some publishers title.)
i took four command buttons and wrote following code for each.



Private Sub cmdadd_Click()

Data1.Recordset .AddNew

txtadd.SetFocus

End Sub

Private Sub cmdlast_Click()
Data1.Recordset .MoveLast

End Sub

Private Sub cmdnext_Click()
Data1.Recordset .MoveNext

End Sub

Private Sub cmdprevious_Click()

Data1.Recordset .MovePrevious
End Sub

Private Sub Command4_Click()

Data1.Recordset .MoveFirst

End Sub

But when i press each button i get error
"Compile errore
Invelide or unqualified reference"
can any one please help me what could be the reason .

(Its not homework as i gave my code.)

Replies

  • shalini_goel14
    shalini_goel14
    Is this your complete code? Which line it is highlighting while giving compiler errror? Are there already any records in your database? Try checking once putting Data1.Recordset.eof [End of file] check
  • safwan
    safwan
    Shallini .movenext line is highlighted when i press movenext button (command button ) in all command buttons same case

    and when i tried your code like "data1.recordset.eof " my vb setup stops working.
  • shalini_goel14
    shalini_goel14
    Safwan if you will add it simply like this "data1.recordset.eof" how it will work tell?I mean to say , use it like this

    Private Sub cmdnext_Click()
    if(!Data1.Recordset.eof )
    Data1.Recordset .MoveNext
    end if
    End Sub

    1 suggestion[take it or ignore it your wish 馃槓 ]: First try only for 1 button rather than adding all at a time. When it works , go for rest.

    [PS: Grant excuse if any syntax errors are there in above snippet.]
  • safwan
    safwan
    shallini i tried same like you as i have book but its also not working now i will try to connect oracle and see is it work or not then i will tell you.

    Any cEans if you can solve proble m the please help here.

You are reading an archived discussion.

Related Posts

UPS FIELD SERVICE TECHNICIAN Company Introduction: 路A strong expanding product sales and servicesupport organization of critical power & environmental equipment for mission-criticaloperation facilities and data centres. 路Company is looking for...
Hey Guys...Just got to know from my friends that Acer has some cool offers for Indian students who are going abroad for studies. The offer is limited till July 31st.
Hello all, This is my first thread here. iam looking for some one who has bit(good) experience in building hydraulic pack.making one machine which i think will work better with...
i need a seminar on google chrome os with power point presentation.
Hi everyone, I have fininshed my B.E in Mechanical Engineering. I have been selected as Trainee in Mahindra and Mahindra. I'm thinking of doing MTech. But my doubt is if...