Access: Display hidden combobox column in textbox - ms-access

I have a combobox with a record source that brings 4 columns, but only shows the second column (Column Widths: 0";1";0";0"). I am trying to display the third column value selected in a text box, using the it's control Source property.

A combo's Column property uses zero-based index numbers, so the third column is Column(2).
Set the text box's Control Source property to ...
=[YourComboName].[Column](2)

If you're looking to show both column 2 and column 3
Column Count = 2
Column Width = 0;1;1;0
If you're looking to show column 3 instead of column 2
Column Width = 0;0;1;0

Related

SSRS - hide a column and change width of other column

I'm creating a report that has 5 columns. However, one column can have no data and in that case I need to hide it. This works using the 'Hidden' property of column but when the column is hidden, I want to make the first column wider. Is there any way to do this in expression?
The only solution I found is to have multiple same tablixes with different column count and then show or hide each tablix appropriately if the specific column has no data. (by checking 'Max' value in column).
Unfortunately, it's not possible to enter an expression to the column width property but if you simply need to change the width of one other column when the first is hidden, I've come up with a workaround that works fairly well.
The idea is a little easier and requires less data to load than your current solution. Basically, you'll create an identical width column that is simply empty -- but set the borders to appear as if it is simply part of another column. So you'll simple reverse the expression used to hide the column with no data in the hidden property. To achieve this, depending on where you choose to add the extra space column, you'll have to adjust the borders of the adjoining cells where there is no right border on the cell to the left and a left border on the cell to the right. Depending on your layout, you would only need a top and bottom border on the extra space column cells.
I did something similar with a report that has 3 pages and 11 columns -- but 8 of the columns changed from page to page. I had to hide one column, show another, and used expressions in column headers and detail rows to simply change the data in each column based on a field that returns the type of the data.

Microsoft Access - The field 'column bound' doesn't work properly

I have problem with the 'column bound' option.
I want to create a combo box so that the field will show an other table field, and when I open the box it will show the first 3 columns. When I choose the row, I want it to save the 2nd value.
For that I defined the field like this:
Display control - combo box
Row source data - Table/Query
Row source - Customers
Bound column - 2 ; column count - 3
When I click and chose a row from the list that roll down, it shows me the first column value in the cell, instead of the second column value.
Can someone help me figure out the problem? (I check the field type and its fine - text)
Thanks in advance,
Gal :)
You need to set the widths of the preceding columns to 0 if you don't want them visible. Otherwise when you bind the columns they show exactly as they are formatted in the table. i.e. if you want to display column 3, columns 1 and 2 need to be set in the display to Column Widths..... 0";0";1". You should notice when you expand the field that all three columns are displaying, but you only see the data from column 1 because the rest is being cut off in your box.
What you really want to do is set the dropdown as two values only, one hidden with the actual bound value and the other with whatever you want to display. For example if the 3 columns you wanted displayed are: [ID], [Name] and [Address] and you want [Name] to be your "bound" field your rowsource should be:
SELECT [Name], [ID] & ' - ' & [Name] & '-' & [Address] As DisplayField FROM Customers
As stated by 'mkinson' above; your table's field-level property 'Column Width' has to be set to 0" for ones which you would not want to show up inside your combo box.
Example: If you have three columns, but you want to show only the column 2; In the table design view->Field properties->Column Width has to be set with a value 0";1";0".
Similarly, if you want to show only the column 3; you would set the Field-level Column Width property to 0";0";1".
This can be confusing since the column order that is displayed in the dropdown list is NOT zero-based. In other words, the first column, whether it is displayed or not, is 1, not 0.
So, if you are selecting Col_ID; col_Name and col_Address for the list and you want to store col_ID but only display col_Name and col_Address, you would specify a Column Count of 3 with display widths of 0";1";2" but SET THE BOUND COLUMN AS 1, NOT 0.
However, in VBA, if you want to refer to the value in that hidden first column, the one we just called Column 1, it is referred to as column 0. Like cmb_Customer.Column(0).

I want to expand the length of title textbox in report builder 3.0

I want to horizontally expand the length of the title textbox in Report Builder 3.0 with the expansion of the column.
I think it requires an expression on the textbox but I am not able to enter a proper expression.
"The title textbox must be expand with the expansion of the column 'NAME'."
In order for the textbox to expand with the column group, it has to be within an object that is forced to expand with it. There's no property to simply link their right border.
One option is to add another row outside and above the column group like this:
Unfortunately, you cannot merge these two cells in the top row, but the second cell will grow to cover all the columns in the group.
The other option is to wrap the title and table in another table. To do this you would start by creating a table with 1 column and 2 rows.
Then you drag the title textbox into the top row and the table into the second row.
The only downside with this method is that it can be tricky to resize columns, but you can always edit your main table first and then drag it into the other table at the end.

I am trying to get more spacing in my combo box in Access

I am trying to get more spacing in the combo box menu:
The first column is room and the second column is building. As you can see, the first few entries don't show nicely. I would like to have more padding in each column. Is there a simply trick? Thank you!
Set the ColumnWidths property of the combo box. It's on the Format tab under Column count.
The default width per column is 2.54 cm (1 inch), you might try e.g. 3.5cm;1.5cm

matrix display only first value of a field

i have the below matrix in report builder 3.0:
the field "Market Company Name" could have multiple values, however when i generate the report only the first value is displayed, while it should display each value on a row.
i tried to put it in the row group or column group it will display properly but the position of the field is not where i want it, i want it in this format.
can any one assist??
If the data are displayed correctly when you use row grouping you can set the width of this column to 0. This way you keep the grouping but the column as such will not be visible.