473,480 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to reference combobox's column property from textbox on a report

65 New Member
hello,
i have a form that opens for a report. the user selects criteria from combo boxes, clicks ok, the form is hidden, and that criteria is applied to the recordset of a report that opens. i would like the value of one of the combobox to appear in the report title.

i have been trying in a text box:
=[Forms]![frmCriteria]![cboCombo]
and this works fine. however, i would like the value of the second column and trying this has not worked so far:
=[Forms]![frmCriteria]![cboCombo].[Column(1)]

what is the proper syntax?

thanks
Dec 11 '07 #1
7 7902
Rabbit
12,516 Recognized Expert Moderator MVP
Get rid of those brackets.
Dec 11 '07 #2
ADezii
8,834 Recognized Expert Expert
hello,
i have a form that opens for a report. the user selects criteria from combo boxes, clicks ok, the form is hidden, and that criteria is applied to the recordset of a report that opens. i would like the value of one of the combobox to appear in the report title.

i have been trying in a text box:
=[Forms]![frmCriteria]![cboCombo]
and this works fine. however, i would like the value of the second column and trying this has not worked so far:
=[Forms]![frmCriteria]![cboCombo].[Column(1)]

what is the proper syntax?

thanks
Good news, you can actually keep 6 of the 8 brackets, just lose 7 and 8:
Expand|Select|Wrap|Line Numbers
  1. =[Forms]![frmCriteria]![cboCombo].Column(1)
Dec 12 '07 #3
freeskier
65 New Member
when i enter that into the textbox it is automatically changed to read

=[Forms]![frmCriteria]![cboCombo].[Column](1)

Good news, you can actually keep 6 of the 8 brackets, just lose 7 and 8:
Expand|Select|Wrap|Line Numbers
  1. =[Forms]![frmCriteria]![cboCombo].Column(1)
Dec 12 '07 #4
ADezii
8,834 Recognized Expert Expert
when i enter that into the textbox it is automatically changed to read

=[Forms]![frmCriteria]![cboCombo].[Column](1)
When frmCriteria is Open, it will automatically be formatted to:
Expand|Select|Wrap|Line Numbers
  1. =Forms!frmCriteria!cboCombo.Column(1)
Dec 12 '07 #5
freeskier
65 New Member
When frmCriteria is Open, it will automatically be formatted to:
Expand|Select|Wrap|Line Numbers
  1. =Forms!frmCriteria!cboCombo.Column(1)
thanks so much! yet another MS Access idiosyncrasy...
Dec 12 '07 #6
Rabbit
12,516 Recognized Expert Moderator MVP
thanks so much! yet another MS Access idiosyncrasy...
Well.. it's not too odd an event. When a form is not open, the controls are not loaded so if you try to reference it, Access won't know what it is, hence the brackets. But if the form is loaded, then Access knows what you are trying to refer to.
Dec 12 '07 #7
Ham1zan
1 New Member
Hello, i know that this thread has been solved, but i have a similar issue with freeskier.

I would like to know, would the solution

Expand|Select|Wrap|Line Numbers
  1. =[Forms]![frmCriteria]![cboCombo].Column(1)
work if i were to add it in the Criteria row of a query?
Nov 30 '16 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
6080
by: Ronny Sigo | last post by:
Hello all, On my form I have an unbound combobox based on a query displaying two rows. The rows are : 1) Zipcode (Leftmost (In the query this field is sorted ascending 2 City The...
6
54285
by: deko | last post by:
Can I reference a column other than the bound column of a ComboBox in a query? SELECT ... WHERE CtlID = Forms!frmMain!cbxCtlID.Column(1); (this does not seem to work) Or must I add a hidden...
8
12062
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
2
2497
by: Susan Bricker | last post by:
Greetings! Still the same application (as previous posts). I worked on the app while at work (don't tell my boss ... cause this is just for fun and not work related) and the form was working,...
3
3012
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
3
3151
by: Poewood | last post by:
Okay here are four classes for a pocket pc program: Input, fpositional, ComboBoxArray and TextBoxArray. The "input" class is the form. I use the fpositional class to handle most of the functions...
3
6801
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
3
2419
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an...
6
3544
by: Thief_ | last post by:
Can a combobox conatin more than one column? I want to store text in one column and in the other (hidden) column store integer values which are associated with the text. VB.Net 2003 -- |...
0
7041
marktang
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,...
0
7084
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...
1
6739
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...
1
4779
isladogs
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...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
181
bsmnconsultancy
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...

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.