Re: Function Find
From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 05/23/04
- Next message: Chris Mills: "Re: Access runtime packaging error"
- Previous message: Scott McDaniel: "Re: Function Find"
- In reply to: Scott McDaniel: "Re: Function Find"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 23 May 2021 14:15:56 -0400
While it's true that he needs a reference to DAO, I would think he's got
that, otherwise it would fail on the Dim dbsLetter As Database statement
with a "User Type not found" error.
This question was multiposted, and I believe the correct answer's already
been given in one of the other newsgroups to which he posted. The suggestion
made there was that Dim tblLetter As Variant should be rewritten to declare
the variable as Dim tblLetter As DAO.Recordset
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Scott McDaniel" <scott@NO___Spam--thedatabaseplace.net> wrote in message news:A_mdna_JQZgITi3dRVn-sQ@comcast.com... > You need to set a reference to the DAO library. To do this, open the Visual > Basic Editor (Ctrl + G), select Tools-References and find/check Microsoft > DAO xx Library, where xx is the highest number you find listed. > > However, you should get into the habit of disambigulating your objects: > > Dim rst As DAO.Recordset > Dim adoRST As ADODB.Recordset > dim dbs As DAO.Database > > etc etc > > "Paul" <rousseau@nb.sympatico.ca> wrote in message > news:DA2sc.46570$Np3.1959735@ursa-nb00s0.nbnet.nb.ca... > > I use to have a program running under Access 98, and since we moved to > > Access 2000 the following code do not work, I have the message: > > Run time error 3251, > > Operation is not support for this type of object. > > There is the code: > > Private Sub Command30_Click() > > > > Dim dbsLetter As Database > > Dim tblLetter As Variant > > Set dbsLetter = CurrentDb > > Set tblLetter = dbsLetter.OpenRecordset("Letter_3_Table") > > If (Me![ToCC] <> "" Or Me![CC2] <> "" Or Me![CC3] <> "" Or Me![CC4] <> "") > > Then > > tblLetter.FindFirst ("Issue_ID = " & Me![IssueID]) > > tblLetter.Edit > > tblLetter![CCSend].Value = Me![ToCC] > > tblLetter![CC2Send].Value = Me![CC2] > > tblLetter![CC3Send].Value = Me![CC3] > > tblLetter![CC4Send].Value = Me![CC4] > > tblLetter.Update > > End If > > dbsLetter.Close > > DoCmd.RunMacro ("send email") > > MsgBox ("File has been sent by email") > > End Sub > > Any help would be appreciate. > > Paul > > > > > > > >
- Next message: Chris Mills: "Re: Access runtime packaging error"
- Previous message: Scott McDaniel: "Re: Function Find"
- In reply to: Scott McDaniel: "Re: Function Find"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
- Re: Member or Data Member not Found
... Microsoft introduced a new data access method in the late 90s known as ADO. ...
Access 97 and previous only had DAO in them. ... You must disambiguate as Dim rst
As DAO.Recordset. ... (microsoft.public.access.formscoding) - Re: Need help with a DAO to ADO conversion
... the open/close code of the DAO object. ... Dim wksCurr As DAO.Workspace
... Dim fldCurr As DAO.Field ... Set dbCurr = OpenDatabase ... (microsoft.public.access.formscoding) - Re: Refreshing subform
... the new data is added to the subform. ... I do not want to use DAO. ...
>> Dim CurrConn As New ADODB.Connection ... >> Exit Sub ... (microsoft.public.access.formscoding) - Re: Address List
... DAO, so the lines that Duane has for ADO need to be commented out and the ...
Dim rs As DAO.Recordset ... Dim strConcat As String 'build return string ...
"John Spencer" wrote: ... (microsoft.public.access.queries) - Re: Moving ADO routine back to DAO
... Problems with missing DAO 3.6 references are not unheard of, ... non-trivial
app, though. ... > I have a client running an app I developed ... > 110:
Dim errloop As Error ... (microsoft.public.access.modulesdaovba)