In the control source of a textbox, is there a way to refer to a column of a
combobox? For example:
=[CbxName].Column(2)
Thanks,
Jack 9 7417
Jack wrote: In the control source of a textbox, is there a way to refer to a column of a combobox? For example: =[CbxName].Column(2)
Exactly like that. Just note that the column number is zero
based.
Did you try it? If it didn't work, what happened.
--
Marsh
MVP [MS Access]
It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the
third column.
This is in a subform where the subform is continuous.
Jack
"Marshall Barton" <ma*********@wo wway.com> wrote in message
news:2l******** *************** *********@4ax.c om... Jack wrote:
In the control source of a textbox, is there a way to refer to a column
of acombobox? For example: =[CbxName].Column(2)
Exactly like that. Just note that the column number is zero based.
Did you try it? If it didn't work, what happened.
-- Marsh MVP [MS Access]
In the after update event of your combo box type in:
txtTextBoxName= cbxName.column( 2)
That should do it.
dixie
"Jack" <pa***@nmurphy. com> wrote in message
news:US******** *********@newsr ead2.news.atl.e arthlink.net... It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the third column.
This is in a subform where the subform is continuous.
Jack
"Marshall Barton" <ma*********@wo wway.com> wrote in message news:2l******** *************** *********@4ax.c om... Jack wrote:
>In the control source of a textbox, is there a way to refer to a column of a >combobox? For example: >=[CbxName].Column(2)
Exactly like that. Just note that the column number is zero based.
Did you try it? If it didn't work, what happened.
-- Marsh MVP [MS Access]
#Name implies that you spelled the name of the combo box
incorrectly or left out the = sign.
However, this isn't going to do what you want in a
continuous (sub)form. All copies of the text box will
display the same value because there is only one combo box
control (the current record).
--
Marsh
MVP [MS Access]
Jack wrote: It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the third column.
This is in a subform where the subform is continuous.
Jack wrote: >In the control source of a textbox, is there a way to refer to a columnof a >combobox? For example: >=[CbxName].Column(2)
"Marshall Barton" wrote Exactly like that. Just note that the column number is zero based.
Did you try it? If it didn't work, what happened.
Perhaps the problem is the square brackets around the combo box name.
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"Marshall Barton" <ma*********@wo wway.com> wrote in message
news:ku******** *************** *********@4ax.c om... #Name implies that you spelled the name of the combo box incorrectly or left out the = sign.
However, this isn't going to do what you want in a continuous (sub)form. All copies of the text box will display the same value because there is only one combo box control (the current record). -- Marsh MVP [MS Access]
Jack wrote:It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the third column.
This is in a subform where the subform is continuous.
Jack wrote: >In the control source of a textbox, is there a way to refer to a column of a >combobox? For example: >=[CbxName].Column(2)
"Marshall Barton" wrote Exactly like that. Just note that the column number is zero based.
Did you try it? If it didn't work, what happened.
Douglas J. Steele wrote: Perhaps the problem is the square brackets around the combo box name.
I don't think so Doug. The expression parser seems to add
(A97) and remove (AXP) square brackets at its own whim,
regardless of how it's originally typed.
--
Marsh
MVP [MS Access]
A continuous form will correctly display the 3rd column for each different
record.
Make sure the name of the control is not also the name of a field.
--
Duane Hookom
MS Access MVP
"Marshall Barton" <ma*********@wo wway.com> wrote in message
news:ku******** *************** *********@4ax.c om... #Name implies that you spelled the name of the combo box incorrectly or left out the = sign.
However, this isn't going to do what you want in a continuous (sub)form. All copies of the text box will display the same value because there is only one combo box control (the current record). -- Marsh MVP [MS Access]
Jack wrote:It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the third column.
This is in a subform where the subform is continuous.
Jack wrote: >In the control source of a textbox, is there a way to refer to a column of a >combobox? For example: >=[CbxName].Column(2)
"Marshall Barton" wrote Exactly like that. Just note that the column number is zero based.
Did you try it? If it didn't work, what happened.
Thanks, Duane, for your response!
<<Make sure the name of the control is not also the name of a field.>>
Access defaults to naming a control the same as the name of the field. Why
does it have to be changed?
Jack
"Duane Hookom" <duanehookom@NO _SPAMhotmail.co m> wrote in message
news:OF******** ******@TK2MSFTN GP10.phx.gbl... A continuous form will correctly display the 3rd column for each different record.
Make sure the name of the control is not also the name of a field.
-- Duane Hookom MS Access MVP
"Marshall Barton" <ma*********@wo wway.com> wrote in message news:ku******** *************** *********@4ax.c om... #Name implies that you spelled the name of the combo box incorrectly or left out the = sign.
However, this isn't going to do what you want in a continuous (sub)form. All copies of the text box will display the same value because there is only one combo box control (the current record). -- Marsh MVP [MS Access]
Jack wrote:It didn't work. I got the #Name error.
The cbx has three columns, column count = 3, and I need to refer to the third column.
This is in a subform where the subform is continuous.
Jack wrote: >In the control source of a textbox, is there a way to refer to a
columnof a >combobox? For example: >=[CbxName].Column(2)
"Marshall Barton" wrote Exactly like that. Just note that the column number is zero based.
Did you try it? If it didn't work, what happened.
If you don't change it in this case, ACCESS will assume that you mean the
field to which the control is bound, not the control, and the code will
error because a field does not have a Column property.
--
Ken Snell
<MS ACCESS MVP>
"Jack" <pa***@nmurphy. com> wrote in message
news:1E******** *********@newsr ead3.news.atl.e arthlink.net... Thanks, Duane, for your response!
<<Make sure the name of the control is not also the name of a field.>>
Access defaults to naming a control the same as the name of the field. Why does it have to be changed?
Jack "Duane Hookom" <duanehookom@NO _SPAMhotmail.co m> wrote in message news:OF******** ******@TK2MSFTN GP10.phx.gbl... A continuous form will correctly display the 3rd column for each different record.
Make sure the name of the control is not also the name of a field.
-- Duane Hookom MS Access MVP
"Marshall Barton" <ma*********@wo wway.com> wrote in message news:ku******** *************** *********@4ax.c om... > #Name implies that you spelled the name of the combo box > incorrectly or left out the = sign. > > However, this isn't going to do what you want in a > continuous (sub)form. All copies of the text box will > display the same value because there is only one combo box > control (the current record). > -- > Marsh > MVP [MS Access] > > > Jack wrote: >>It didn't work. I got the #Name error. >> >>The cbx has three columns, column count = 3, and I need to refer to the >>third column. >> >>This is in a subform where the subform is continuous. >> >> >>> Jack wrote: >>> >In the control source of a textbox, is there a way to refer to a column >>of a >>> >combobox? For example: >>> >=[CbxName].Column(2) >>> >>> >>"Marshall Barton" wrote >>> Exactly like that. Just note that the column number is zero >>> based. >>> >>> Did you try it? If it didn't work, what happened. >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Billy Jacobs |
last post by:
I have created a DataGridColumnDatePicker Component so
that I can put a datetimepicker control in my datagrid.
It almost works.
When I put my mouse in the cell it changes to a
datetimepicker control. I can then select a date which
displays in the cell. When I leave the cell however I get
the following error:
|
by: Will Pittenger |
last post by:
I have a Control derived class. When the parent of the control changes the
control's Location property, the stack overflows. I have not found a way to
find out what was on the stack when it does overflow. All I know is that
the program is either stopped due to an exception at the end of Main or has
exited after the Stack Overflow exception. (Both cases are Debug builds
running in the debugger.)
After a lot of trial and error (mostly...
|
by: Roger |
last post by:
I've got a continuous form based on a query
the first 2 controls on the form are bound to columns in the query
a third control (paymentAmount) is unbound
I have a total control in the footer, where the control source is
=sum(paymentAmount)
this displays #Error#
but if I temporarily change my query to add a paymentAmount column
|
by: Anil Kulkarni |
last post by:
Hi Folks,
My Situation(program requirement):
I have datalist control and having Datagrid inside each
ItemTemplate column of datalist control.I am fetching data
from "Product" & "StyleDetails" table where I am getting
number of "Styles" per product. I am using "DataTable" for
fetching product details(including style number). Now, I
am filtering this datatable on "StyleNumber" for fetching
style details and using that filtered Datatable...
|
by: Carmen de Lara |
last post by:
hello to all, I found in Internet the following code that is very usefull to me. The code detects any character that is entered to datagrid, I am interested in the control key F2 but I don't know how to adding an event handler to a column of datagrid that raise when this key is pressed. Please help m
Private Sub AddCustomDataTableStyle(
Dim ts1 As New DataGridTableStyle(
ts1.MappingName = "Customers
' Add textbox column style so we can...
| |
by: jerry.ranch |
last post by:
I've been using row source with the QBE for my list and combo
boxes..when would I use control source?
jerry
|
by: Rich |
last post by:
Hello,
I am reading data from a sql server table that is under replication. This
table has the replicatin GUID column that is generated with replicatin. I am
reading the data from a dataAdapter/Dataset using a dataview which is the
data source for a datagridview control. When I scroll horizontally in the
datagridview control and reach this GUID column (which is not at the end of
the table) it raises the datagridview dataError event. ...
|
by: howardr101 |
last post by:
Hi,
I'm really new to this XSL stuff and there's a lot of information out
there on the web, I just can't seem to find a definitive answer to my
question, hence......
In FO, I know that you define a block and use the keep-together
attribute to specify whether or not the block should be split over
multiple pages - unless the block itself is longer than a page.
|
by: Lou O |
last post by:
Is it possible to use the row (index) of a list box as control source
Property for a text box?
Example: Text1.ControlSource Property is set to "= List1.Column(0,2)"
in design view.
When I open the form, Text1 does not display the value of
List1.Column(0,2)
Am I missing something?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |