PC Review


Reply
Thread Tools Rate Thread

Acc2003 object naming references are stricter than Acc2000?

 
 
WW
Guest
Posts: n/a
 
      18th Jan 2004
Well, I upgraded everything from Office 2000 to Office
2003. Now I have a major problem. Access 2000 never cared
if you refer to an object as
-----------------------
[Forms]![frmExplorer]![sbfrmGeneric]![cbo_Search]
-----------------------

or as

-----------------------
[Forms]![frmExplorer]![sbfrmGeneric].[Form]![cbo_Search]
-----------------------

but Access 2003 (with 2002-2003 file format) does - and
now my 60 Mb front-end application has forms w/ subforms
that no longer function because of this. (Access 2003
requires the extra << .[Form]! >> in the reference?)

The amount of code that I would have to sift through to
fix this is enormous. Queries, forms, subforms, reports,
and modules could all have these inadequate references. If
no one has a solution - I will have to go back to Access
2000.

Thanks for any advice.
-WW
 
Reply With Quote
 
 
 
 
Paul Overway
Guest
Posts: n/a
 
      18th Jan 2004
Either of the methods you are using is bad practice anyway....neither will
catch errors during compile. Any of the following would be better
(depending on need):

Me.SomeControl

Or

Me.Parent.SomeControl

Or

Me.SomeSubForm.Form.SomeControl

Or

Forms("SomeForm").SomeControl

The only time I use the [Forms]![frmExplorer]![sbfrmGeneric]![cbo_Search]
syntax is in queries.

--
Paul Overway
Logico Solutions, LLC
www.logico-solutions.com


"WW" <(E-Mail Removed)> wrote in message
news:004801c3dd78$c50ea070$(E-Mail Removed)...
> Well, I upgraded everything from Office 2000 to Office
> 2003. Now I have a major problem. Access 2000 never cared
> if you refer to an object as
> -----------------------
> [Forms]![frmExplorer]![sbfrmGeneric]![cbo_Search]
> -----------------------
>
> or as
>
> -----------------------
> [Forms]![frmExplorer]![sbfrmGeneric].[Form]![cbo_Search]
> -----------------------
>
> but Access 2003 (with 2002-2003 file format) does - and
> now my 60 Mb front-end application has forms w/ subforms
> that no longer function because of this. (Access 2003
> requires the extra << .[Form]! >> in the reference?)
>
> The amount of code that I would have to sift through to
> fix this is enormous. Queries, forms, subforms, reports,
> and modules could all have these inadequate references. If
> no one has a solution - I will have to go back to Access
> 2000.
>
> Thanks for any advice.
> -WW



 
Reply With Quote
 
Mike Wachal
Guest
Posts: n/a
 
      24th Jan 2004
On Sat, 17 Jan 2004 20:08:46 -0800, WW wrote:

> Well, I upgraded everything from Office 2000 to Office
> 2003. Now I have a major problem. Access 2000 never cared
> if you refer to an object as
> -----------------------
> [Forms]![frmExplorer]![sbfrmGeneric]![cbo_Search]
> -----------------------
>
> or as
>
> -----------------------
> [Forms]![frmExplorer]![sbfrmGeneric].[Form]![cbo_Search]
> -----------------------
>
> but Access 2003 (with 2002-2003 file format) does - and
> now my 60 Mb front-end application has forms w/ subforms
> that no longer function because of this. (Access 2003
> requires the extra << .[Form]! >> in the reference?)
>
> The amount of code that I would have to sift through to
> fix this is enormous. Queries, forms, subforms, reports,
> and modules could all have these inadequate references. If
> no one has a solution - I will have to go back to Access
> 2000.
>
> Thanks for any advice.
> -WW


Hi WW,

This is a known issue that is being investigated. I don't believe this
problem affects your modules, so that's one less place you'd have to
consider making changes. You should be able to test to verify if modules
are affected by this.

If you own the Access 2003 Developer Extensions, you can use the property
scanner to examine all the properties in your database for something like
"Forms!". While this won't make the changes for you, at least it will give
you a list of all the location where this syntax is used and make it much
easier to make the changes.

Another way to workaround this issue, though it is not suggested, is to
turn off the Jet sandbox mode. I believe there is value in blocking
expression such as Kill and others that give hackers access to your file
system, which is why I don't recomend turning Sandbox off. I think there is
also a benefit in using the fully quaified .Form reference to make your
code more readable and managable. By using this syntax, there will never be
any doubt when others read your code/expressions that you are working with
the Form object of a Subform control. Just my $ 0.02.

--
Regards,
Mike Wachal
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      1st Feb 2004
"Paul Overway" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)
> Either of the methods you are using is bad practice anyway....neither
> will catch errors during compile. Any of the following would be
> better (depending on need):
>
> Me.SomeControl
>
> Or
>
> Me.Parent.SomeControl
>
> Or
>
> Me.SomeSubForm.Form.SomeControl
>
> Or
>
> Forms("SomeForm").SomeControl
>
> The only time I use the
> [Forms]![frmExplorer]![sbfrmGeneric]![cbo_Search] syntax is in
> queries.


I'd say it is a matter of opinion whether it is bad practice or not, and
there are arguments to be made on either side -- though in fact I also
prefer to use the dot notation as Paul Overway recommends. Note,
though, that there are circumstances in which one *must* use the bang
notation. Specifically, if one needs to refer to a control or field
that has the same name as a property of the form (not a good idea, but
it happens), then the bang must be used.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
object name doesn't follow microsoft access object naming rules Chuck W Microsoft Access 3 11th Dec 2009 03:00 PM
developing in ACC2000, production in ACC2003 =?Utf-8?B?TWFyaw==?= Microsoft Access 4 26th Jul 2005 04:38 AM
Another Acc2000 vs Acc2003 problem : dbo.mytable = dbo_mytable ! (Error 3078) Christophe Niel Microsoft Access ADP SQL Server 1 12th Jul 2005 02:34 PM
Acc2003 Name AutoCorrect/Object Dependency problems WW Microsoft Access 1 22nd Jan 2004 03:58 AM
Acc2003 Object Name Reference Problems!!! WW Microsoft Access 1 18th Jan 2004 05:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:29 PM.