Re: Names of textboxes on tab-pages within a tab control?



Try:
Me.Page1HomeSpot.SetFocus

If that still fails, and you are certain you have a text box with that name
on your form, it sounds like Access is confused about the names. Try this
sequence:
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
and the code syntax is compilable.

--
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.

"MLH" <CRCI@xxxxxxxxxxxxxx> wrote in message
news:o7qse2hul5u61jl4d3uqj8ke7gj64al5cl@xxxxxxxxxx
I have a tab control named TabCtl210. It has 3 tabs.
named Page211, Page212 and Page213. Each of
those 3 tab-pages has a textbox control named
Page1HomeSpot, Page2HomeSpot and Page3HomeSpot
respectively.

I got an error #2109: "There is no field named Page1HomeSpot
in the current record"

There's only one line of code in the entire form module that
references the control:

Private Sub Page1()
DoCmd.GoToControl ("Page1HomeSpot")
End Sub

Under what circumstances would Access give em this error?


.



Relevant Pages

  • Re: Problems with Access 2003
    ... there is a bug in the printer driver One way to ... Compact the database to get rid of this junk: ... Still in the code window, choose Compile from the Debug menu. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Error on any code in Subform
    ... Could be any of several things that has gone wrong, so here's a sequence that will address many possible problems and should get you going again. ... Compact the database: ... Open Access, and compact again. ... Still in the code window, choose Compile from the Debug menu. ...
    (microsoft.public.access.formscoding)
  • Re: Access Crashes When Rt Click Build in Query Design View
    ... Since you disabled Name AutoCorrect and decompiled and compact/repaired and fixed references and now have fully compiled code and then recreated the query, I'm not sure what alternatives might help. ... And it will happen on more than one query in the database. ... Compact the database to get rid of this junk: ...
    (comp.databases.ms-access)
  • RE: Cant save changes to forms
    ... Compact the database to get rid of this junk: ... Uncheck any references you do not need. ... Still in the code window, choose Compile from the Debug menu. ...
    (microsoft.public.access.forms)
  • Re: Access 2003 Possible Corruption?
    ... Jana, you've had some good answers, but this seems like an important enough ... Compact the database to get rid of this junk: ... Uncheck any references you do not need. ...
    (comp.databases.ms-access)