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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help (recordset) (edit table)

Status
Not open for further replies.

danvzla

Programmer
Jan 16, 2004
28
FI
I need to do a VBA code for navigate into a table an edit some of the info. I'm using the recordset funtion but is not working. I'm starting by creating the VAR

Dim rst As DAO.Recordset

but every time a run the code i got a Compile error in that line

"user-defined type not defined"

Is ther something wrong with the syntaxis of this code:?

Sub NewRNWE_Click()

Dim rst As DAO.Recordset
Dim strSearchName As String

Set rst = Me.Recordset
strSearchName = Str(Me!Tech)
rst.FindFirst "Tech = " & strSearchName
If rst.NoMatch Then
MsgBox "Record not found"
End If
rst.Close
End Sub

 
It looks as if you haven't got a reference to DAO 3.6 set. It should be automatically set in Access VBA, but if your in another programs VBA you'll need to set it explicitly. In the VBA editor goto Tools|References and tick the DAO 3.6 (or whichever) that you need

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top