Šta je novo?

VB: Forma_load i data.recordset.movefirst problem

kdejan

Čuven
Učlanjen(a)
21.08.2002
Poruke
519
Poena
630
Zasto ovo nece da radi?

Private Sub Form_Load()
data1.recordset.movefirst
End Sub

ili

Private Sub Form_Load()
call otvori_click
End Sub

private sub Otvori_click()
data1.recordset.movefirst
end sub

U oba slucaja prijavljuje sledecu gresku:
Run time error '91':
Object ariable or With block variable not set
 
Hvala!
Moze li samo jos jedno malo objasnjenje? Sta konkretno radi ovaj refresh? Zasto je program radio normalno kada se klikne na dume otvori, a ovako sa pozivanjem nije hteo?
 
The Data control is automatically initialized when your application starts before the initial Form_Load procedure. If the Connect, DatabaseName, Options, RecordSource, Exclusive, ReadOnly and RecordsetType properties are valid, or if you set these Data control properties atrun time and use the Refresh method, the Microsoft Jet database engine attempts to create a new Recordset object based on those properties. This Recordset is accessible through the Data control's Recordset property. If, however, one or more of these properties is set incorrectly at design time, an untrappable error occurs when Visual Basic attempts to use the properties to open the specified database and create the Recordset object
 
Nazad
Vrh Dno