Re: Edit Method in VB
From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 09/29/04
- Next message: Dirk Goldgar: "Re: Can Accesslaunch a URL in a browser?"
- Previous message: moondaddy: "How to open and close excel with our leaving ghost file"
- In reply to: Jill Marlow: "Edit Method in VB"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Sep 2004 00:46:39 -0400
"Jill Marlow" <J_Marlow@msn.com.(donotspam)> wrote in message
news:B5FDAD02-1F2D-487F-B2E5-0AA3448794CC@microsoft.com
> I used to edit records in a module by using a tbl.Edit method. I
> created a new database in Access XP and tried to use the Edit method,
> but it doesn't recognize it. I checked the Microsoft DAO 3.6 library
> under Tools, References, but it still doesn't work. I see a
> reference to the Edit Method in the Visual Basic Help, complete with
> an example, but it won't work in my database. Is there some other
> library that needs to be checked? If not, is there an alternate
> method that can be used to edit a record in a recordset?
Do you do something like ...
Dim tbl As Recordset
' ...
Set tbl = CurrentDb.OpenRecordset("Some Table or Query")
' ...
tbl.Edit
... and the VB editor tells you there is no such method?
If so, it's probably not a matter of another library that needs to be
checked, but rather one that needs to be *unchecked*. Specifically,
either change your Dim statement to
Dim tbl As DAO.Recordset
or open the References dialog again and remove the check mark next to
Microsoft ActiveX Data Objects 2.x Library. The ADO library also
defines a Recordset object, which doesn't have an Edit method, and
Access was thinking that was the type of recordset you were declaring.
-- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup)
- Next message: Dirk Goldgar: "Re: Can Accesslaunch a URL in a browser?"
- Previous message: moondaddy: "How to open and close excel with our leaving ghost file"
- In reply to: Jill Marlow: "Edit Method in VB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|