473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2162
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 selection is made, fills in several other controls...
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. frmConfigReg is the startup form. It has several controls,...
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 an OleDbDataAdapter routine that extracts the...
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 the best/recommended placement for command buttons...
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 on the first. I have no problem getting the...
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 organization. They take a phone call and need to...
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. Currently, that section of code resides in the...
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 selected, the City combo box updates to reflect...
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 that problem in previous versions of Access. I do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.