A.D.TEJPAL
adtejpal at gmail.com
Mon Jul 2 23:46:04 CDT 2007
Jim,
Would you be in a position to isolate a typical form or report that has caused trouble on account of control names as mentioned in your post, and make it available as a self contained small db, for further investigation ?
Best wishes,
A.D.Tejpal
---------------
----- Original Message -----
From: Jim Lawrence
To: 'Access Developers discussion and problem solving'
Sent: Tuesday, July 03, 2007 00:28
Subject: Re: [AccessD] Open a combobox on entering it
Hi Charlotte:
I have just been running into problems with the controls named the name of the data field... A client has this package and all sorts of weird things
were happening. At 3:00AM, I started naming control appropriately and things started magically working :-)
The strange thing is that the app never complained it just didn't work right and the results were never consistent...
So, don't do it Arthur... if only for your own health and sanity. :-)
Jim
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Monday, July 02, 2007 11:07 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Open a combobox on entering it
I don't have concrete evidence at hand, A. D., but I have run into
problems with code references to a control with the same name as the
underlying field because controls have different methods and properties
available that fields do. I would suspect that there is also a penalty
to pay for making the Access app figure out which one you're addressing
rather than spelling it out by using different names. I'm not working
much in Access anymore, so it will take me time to track down actual
examples.
Charlotte Foust
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.TEJPAL
Sent: Monday, July 02, 2007 10:59 AM
To: Access Developers discussion and problem solving
Cc: adtp at airtelbroadband.in
Subject: Re: [AccessD] Open a combobox on entering it
Naming of Bound Controls On Forms / Reports (Visa Vis Record Source)
==================================
Arthur,
You need not feel apprehensive about your style of letting the name
of pure bound controls remain the same as that of pertinent field in the
record source.
There is no evidence that naming a pure bound control same as its
control source leads to any problem. Following postulation appears to
hold good:
====================================
1 - An unbound or calculated control should not have its name
identical to any of the fields contained in the record source.
2 - At the same time, it is perfectly Ok if the name of a pure bound
control is the same as its control source, which of course is one of the
fields in the record source.
====================================
If any members of the forum would like to disagree, the reason may
kindly be posted along with concrete evidence supporting it. It might be
desirable to clear the picture for a large number of access users, who
might feel somewhat over-whelmed by the universal assertion that no
control should carry the same name as that of a field in the record
source.
What needs to be emphasized is that on a report or bound form,
naming of calculated or unbound controls the same as the name of a field in the record source, could be a recipe for disaster, virtually
equivalent to creation of imposter controls and should never be done.
On the other hand, it should be perfectly all right to name pure
bound controls the same as the record source field that serves as
control source. In fact it could be the preferred practice,
distinguishing such controls from others, which should carry a prefix
like Txt or Cbo etc.
Unfortunately, quite often, advice given in access forums makes a
flat recommendation against naming of controls same as field names,
without explicitly clarifying that the precaution is applicable to other
than pure bound controls.
Best wishes,
A.D.Tejpal
---------------
<< SNIPPED >>