Re: Member or Data Member not Found
- From: Bill Barber <BillBarber@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 27 Apr 2006 06:24:03 -0700
Allen;
Thanks for assisting me!
Management made us reinstall Access 2000, just too many problems
upgrading! The DAO 3.6 is the Reference being used.
I am trying to isolate the problem, but I am having trouble
understanding why it fails so differently going from computer to computer.
I included the update of where I am at this minute.
Now I get invalid or unqualified Reference on the .TableDef below!
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim tdf As DAO.TableDef
Dim fld As Field
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM HrsRate")
For Each tdf In .TableDef
Next tdf
Any more ideas? And, thanks for the help!
"Allen Browne" wrote:
Choose References from the Tools menu. You already have a reference to the.
DAO library (else the code would fail on the first line), but check that it
is DAO 3.6. Referencing an old 2.5/3.5 compatibility library sometimes
worked in 2000 and failed on update to A2002.
It could also be a Name AutoCorrect error. Make sure these check boxes are
unchecked under:
Tools | Options | General
For an explanation of why:
http://allenbrowne.com/bug-03.html
Whether or not you reset the Name AutoCorrupt boxes, compact/repair the
database:
Tools | Database Utilities
If the issue remains, we need to determine whether the failure is tdf.Name
or the call to Left() - possibly a naming clash. To determine this, try:
Debug.Print tdf.Name
or replace the line with:
If tdf.Name Like "AlphaErrors*"
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Bill Barber" <BillBarber@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BC2E11CD-278F-4656-832F-4E79F5F7AE92@xxxxxxxxxxxxxxxx
I updated from Access 2000 to 2002 and now I get this error on something
that
has been working for years.
Here is the code!
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim tdf As TableDefs
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT * FROM AlphaErrors")
With db
For Each tdf In .TableDefs
If Left(tdf.Name, 11) = "AlphaErrors" Then ' Error
Here Member or Data Member not Found On tdf.Name!
MsgBox "Found Error Table"
End If
Next tdf
End With
Does anyone know what I have to change to get this to work?
Thanks a Lot
Bill
- Follow-Ups:
- Re: Member or Data Member not Found
- From: Douglas J Steele
- Re: Member or Data Member not Found
- References:
- Re: Member or Data Member not Found
- From: Allen Browne
- Re: Member or Data Member not Found
- Prev by Date: Re: Unbound Text Box in Subform
- Next by Date: RE: Minimize A Form
- Previous by thread: Re: Member or Data Member not Found
- Next by thread: Re: Member or Data Member not Found
- Index(es):
Relevant Pages
|