Access: Can only populate text boxes with first 2 columns using [List Name].Column(N) - ms-access

In Access 2007 I have the Row Source of a List Box set to a query with 5 Columns. As well as a text box attempting to reference each of those columns based on the list box selection. [List Name].Column(0) & [List Name].Column(1) work perfectly, columns 2 - 4 do not.
Set each text box equal to column 0 or 1 to confirm there weren't any setting specific to the text box inhibiting it and it would display 0 or 1.
I've been researching what each of the List Box Property settings do and tweaking those and nothing is resolving. Below are the properties set to currently.
The query "UP Query" has 5 items in the select statement and I'm able to view it without any issue.
Any help is greatly appreciated!!!!

Check the "All" tab and the column count and make sure it matches the number of columns in the query.

Related

ssrs report - textbox create gap space

I have a report with parameter to select the name and a textbox with expression field name. Below text box the a dataset table.
When I run the report, by default it will return all name on the table and HIDE text box.
When I select name in parameter, it will return for that name and SHOW text box.
I don't have any issue at this point.
BUT I do have problem that the textbox create a gap between header and the table WHEN I run the report by default (not select name in parameter).
My goal is to some how REMOVE THE GAP so the table can move up right below header. ONLY show when name is select on parameter.
You can do this as long as your table is not a matrix (as the column groups prevent you from merging cells).
Add a new row to the top of your table, then select all the cells in that row and merge them.
Now resize the single cell you just created so that it's roughly big enough to hold all the content.
Right-Click the cell and do Insert->Rectangle
Now either add new controls or copy and paste your existing ones into the rectangle.
Right-Click the row header and select "Row visibility", set it to the expression you are currently using to show/hide your text boxes.
That should be it. I did a quick test to try it out and it works perfectly (in this simple scenario). I've put some background colours in just to make it clearer but this is what the design looked like...
The row visibility was simply set to my parameter value =Parameters!HideTopRow.Value=1 . The textboxes in the yellow section are just some arbitrary values from the dataset.
When I run with the option set to 0 I get this..
When I run with the parameter set to 1 I get this.

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 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

Set max lines displayed in WebI BO report

How would I set a maximum lines to display in a BO 4 report? On each page, I'd like to show 20 account numbers in column 1 with item counts in the next columns. There are some good discussions on limiting the rows retrieved in a query (e.g., Limit number of result or rows returned in BO using WebI). Some suggestions include using sections with RowIndex()/20 to limit the lines to 20, so I tried adding a variable =Floor(RowIndex()/20). However, the lines in my report contain aggregated variables, and the row index counts all records retrieved. Thoughts?
One option:
Add a column on the far left of the block. Use the following formula:
=Floor(RunningCount([Account Number])/10)
(assuming, of course, that your dimension is named [Account Number])
Create a break on this column. (Report Element -> Table Layout -> Break -> Add Break). Go back to the same menu and click Manage Breaks. Click the "Start on a new page" checkbox.
This will create a block with a maximum of 20 rows per page. Unfortunately, there's no direct way to hide a column in WebI, so you'd be stuck with this ugly column. What you can do, however, is remove all borders, change the font to white-on-white, and reduce its width as much as possible.

SSRS Matrix banded rows

I'm looking to do banded rows in SSRS.
I've Googled it but only seen examples of it in a table Report not a tablix with multiple groupings.
Lets say I have a dataset
Employee..............Product.........Date...............Amount
Jose..................TV..............2013-12-01.........150
Jose..................TV..............2013-12-02.........100
Jose..................Stereo..........2013-12-01.........50
Jose..................Stereo..........2013-12-04.........100
Jose..................Camera..........2013-12-02.........400
Brad..................TV..............2013-12-03.........100
Brad..................TV..............2013-12-04.........50
Brad..................Stereo..........2013-12-03.........100
Hector................Stereo..........2013-12-04.........50
I want to make a report that looks like
Employee.......Product.......2013-12-01....2013-12-02....2013-12-03....2013-12-04
Brad...........Stereo....................................100
...............TV........................................100............50
Hector.........Stereo...................................................50
Jose...........Camera......................400............................
...............Stereo........50.........................................100
...............TV............150...........100
I wanted to do banded rows.
Let's say
Brad's Stereo line is Blue
Brad's TV line is Green
Hector's Stereo line is blue
Jose's Camera Line is Green
Jose's Stereo Line is Blue
Jose's TV line is Green
The rownumber trick doesn't work because the rows come no particular order
and in the case of Jose's stereo line, the cell under 2013-12-01 and 2013-12-04 would have different values.
I saw a trick using running values and count distinct, but that won't work either.
Anyone have any ideas how to do banded rows in SSRS using a matrix/tablix?
I'm assuming you are starting with a matrix that looks like the image below: two row groups and one column group.
Right click on the row group for Product and choose Add Group -> Child Group. In the Group By box enter "1".
Rename the group to RowColorGroup. Rename the textbox (in the details row to the right of textbox contining the product field) to RowColorGroupTextBox.
Select the value for RowColorGroupTextBox by entering the following as the Value expression: =iif(RunningValue(Fields!Employee.Value & Fields!Product.Value,CountDistinct,Nothing) Mod 2, "LightSteelBlue", "White") (You can change the colors to whatever you want.)
In the textbox properties for RowColorGroupTextBox change the fill color expression to =Value
Remove any text in the header field above RowColorGroupTextBox.
Remove the right border on the textboxes in the column containing RowColorGroupTextBox.
Remove the left border on the textboxes containing the date field and the amount field.
Set the width of the RowColorGroupTextBox to 0 and the CanGrow property to false.
Select the textbox containing the amount fill and set the fill color expression to =ReportItems!RowColorGroupTextbox.Value
This results in a report where the details rows alternate in colors.
Here's a blog post I found that uses the same method.