Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different in access 97 & 2000. In "OpenRecordset"?

Status
Not open for further replies.

Koaz

Programmer
Nov 26, 2002
15
SG
Hi all,

I had try writng the following statement in two access version, but it only worked in access 97.

Private Sub command0_click()
Dim frm As Form
Set frm = [Forms]![form1]
Dim dbs1 As Database
Dim rst1 As Recordset
Dim mrst As Recordset
Dim SQL As String

Set dbs1 = CurrentDb()
*Set rst1 = dbs1.OpenRecordset("test", dbOpenDynaset, dbAppendOnly)


Set rst1 = dbs1.OpenRecordset("test")
With rst1
.AddNew
![nric] = "1234567"
! = "djkjs"
![Text] = "KenKo"
.Update
End With

End Sub


How could make word in access 2000? Help!!!!!

 
You need to explicitly declare a reference to DAO for this to work in Access 2000. From the VBA editor window click Tools, References, then browse for DAO 3.6 (the file's C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll on my machine, if that's any help). Then use the up/down arrows to ensure the reference to DAO comes above any ADO references you may have declared and your code should work.

HTH. [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top