472,353 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Referring to combo box controls on forms in A97

MLH
Somehow, I seem to be able to refer to combo-box controls
in 2 distinctly different ways. A combo-box on an Access 97
form named TagCountyChooserBox seems can be referenced
these ways...

Forms![frmVehicleEntryForm]![TagCountyChooserBox]
and
Forms![frmVehicleEntryForm]![TagCounty]

where TagCounty is the datasource fieldname of the
TagCountyChooserBox control. How is that? I never
remember observing this behavior in Access 2.0. Is it
normal?
Nov 13 '05 #1
4 2102
MLH wrote:
Somehow, I seem to be able to refer to combo-box controls
in 2 distinctly different ways. A combo-box on an Access 97
form named TagCountyChooserBox seems can be referenced
these ways...

Forms![frmVehicleEntryForm]![TagCountyChooserBox]
and
Forms![frmVehicleEntryForm]![TagCounty]

where TagCounty is the datasource fieldname of the
TagCountyChooserBox control. How is that? I never
remember observing this behavior in Access 2.0. Is it
normal?


The second one is NOT referring to the ComboBox. It is referring to the
field named TagCounty.

AFAIK you have always been able to refer to any field in the form's fields
collection. Even those that don't have controls bound to them.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #2
MLH
The behaviour seems limited to expressions entered in the ComboBox
event properties. If I refer to the control with the intent of say...
changing its backcolor property, an expression referring to the
ComboBox either way will succeed in changing the color, but code
will not.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The second one is NOT referring to the ComboBox. It is referring to the
field named TagCounty.

AFAIK you have always been able to refer to any field in the form's fields
collection. Even those that don't have controls bound to them.


Nov 13 '05 #3
MLH wrote:
A combo-box on an Access 97
form named TagCountyChooserBox seems can be referenced
these ways...

Forms![frmVehicleEntryForm]![TagCountyChooserBox]
and
Forms![frmVehicleEntryForm]![TagCounty]

where TagCounty is the datasource fieldname of the
TagCountyChooserBox control. How is that? I never
remember observing this behavior in Access 2.0. Is it
normal?


Yes, definitely, if:

1) the controlsource of the combo box is bound to the field TagCountry, and

2) the bound column of the combobox returns the value for TAGCountry, as
opposed to some other value that a the rowsource for the combo box provides.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #4
MLH wrote:
The behaviour seems limited to expressions entered in the ComboBox
event properties. If I refer to the control with the intent of say...
changing its backcolor property, an expression referring to the
ComboBox either way will succeed in changing the color, but code
will not.


Again, because the second one is refering directly to the field in the
table, not to the ComboBox. A field has no BackColor, only a control does.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Josh Nikle | last post by:
I just realized that I posted this earlier with no title. Sorry. Here's the original post: I have a form with a combo box on it that, when a...
21
by: Mark Rae | last post by:
Hi, Apologies if this is a stupid question - I'm a C# newbie... :-) I have a Windows app with two form: frmConfigReg and frmNewApp....
7
by: Doug | last post by:
Hi I have a combo box (A) that populates a following combo box (B) based on a selection. The selection from the first combo box (A) initiates...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's...
9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent...
2
by: sara | last post by:
I think I don't understand combo boxes and forms - and all that I'm reading is just confusing me more. I am doing a "favor" for a non-profit...
13
by: mirandacascade | last post by:
I want to set things up such that a section of code will have been executed by the time one clicks on the drop down arrow on a combo box control. ...
5
by: samdev | last post by:
I have created two combo boxes in a subform.... For example 1. Combo Box State 2. Combo Box City 3. When a state from the Combo Box State is...
3
by: evenlater | last post by:
Using Access 2007, I've found that combo box back colors change to transparent from normal inconsistently for no reason I can discern. Never had...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.