Access tabular form single cell referencing - ms-access

I have a tabular form derived from table
A B C
1 1A 1B 1C
2
3
What I need to do is changing back color of single cell after update, I can reference the field using me.[Field name] but then it change the backcolor of the whole column, is there any way I can do to specify color change to one cell like what I did using conditional formatting

Related

Automatic Replace "0" with blank cell

I have a sheet called "Test". Column B shows dynamic API calls, then I use a macro to copy all cells from Column B to Column C every 1 hour in order to store those prices, however sometimes API call fails, so it shows 0. I want to mass replace all cells containing "0" (match exact case) from all columns of sheet "Test" without changing Column B (which is the column for the API calls so we don't want to change its formula).
How can I do that?
Thank you!
Google sheets doesn't have this function yet but this could do the trick:
Select all cells (Ctrl + A) click Format > Conditional Formatting
Use the dropdown to select Equal To and type 0
Tick the text tickbox and change the text color to white, this will
effectively hide all your zero values.
You can define a format as
0;-0;

Google Sheets - How to create a dropdown filter to hide columns?

I must have been Googling and trialing/erroring in scripting for 4-5 hours now, I'm stuck in a (frustrating) loop.
I'm trying to create a drop-down filter in A1 which lists all of the values in C1:ZZZ1, and selecting one of the values hides all columns C1:ZZZ1 except the columns that fall under the selected value's merged cell.
Example from the below screenshot:
In A1 would show a drop-down pulled dynamically, which lists "Joe Adams", "Eagle Nest", and "Sabrina". If I select "Eagle Nest" in the A1 drop-down, all I would see is Column A, Column B, and Columns F, G, and H (since Eagle Nest is merged with these 3 columns). The rest of the columns would be hidden. Then, upon clearing the filter (drop-down), all columns would be visible. Is something like this possible??
INDEX/OFFSET is another option. In another sheet, (say Sheet2!A1): Create a drop down for Sheet1!1:1,
A2:
=INDEX(OFFSET(Sheet1!A1,,MATCH(Sheet2!A1,Sheet1!1:1,0)-1,90,3))
Syntax:
OFFSET(cell_reference,‎ offset_rows,‎ offset_columns,‎ [height],‎ [width])

How to return value of unbound column in combo box

How can I get the value of an unbound column of a combo box using the expression builder in Access 2007?
I have a form that controls a query through a combo box where I select a month on the form and Access runs a query for items pertaining to that month. Then I have a report that based on that query.
I'd like the report header to display the month that was selected. I made a text box in the report that uses an expression as the control source like so "=[Forms]![frm Annual Notices Report]![Combo10]". Which works expect it returns the value in Col1. How can I make my text box display the month in Col2? I've tried "=[Forms]![frmMyform]![Combo10(1)]", but it returns an error.
My combo box is setup like this:
Col1 Col2
1 January
2 February
3 March
4 April
... ...
I need to use the month index to control the query, but I also want to make a text box in a report show the month as written.
TL;DR:
How can I make a text box display the month in Col2?
Currently I have this: "=[Forms]![frmMyForm]![Combo10]"
I think I need something like this: "=[Forms]![frmMyform]![Combo10(1)]"
You need the .Column property.
=[Forms]![frmMyForm]![Combo10].Column(1)
is the second column.
BTW, there is also the MonthName() function.

how to do column grouping in table or list

I have a problem in SSRS reporting.
I have a data like this
BILLNO | AMT
----------+--------
123 | 1000.00
1223 | 2000.00
I need to show in table or list in following way
123:1000.00 1223:2000.00
I tried by applying column and row grouping on two unique keys but it didn't work for me
So you need to show both the values in the same cell?
Firstly, assuming that you want to display this in a vertical list, you can simply add both values to a single text box.
Add BillNo to the cell
Add a colon in plain text
Create a new placeholder in the textbox (by right clicking), and set the Value of this to =Fields!Amount.Value
The design looks like this
And the output like this
Alternatively, if you want them side by side, create a matrix with column groupings on BillNo (you can always delete the column header, but not the associated groupings to improve your layout if you wish)
--->

SSRS - How to build a simple multi-column report?

I am using SQL Server 2008 and I want to show 1 single field from a table in multiple columns in the report. Just like if I were to print labels. How can I achieve this?
Example:
Instead of printing:
Names Report
Andrea
Austin
Barbara
Bob
Bruno
Cathy
Chis
...
I want to print in columns (say 3 fixed columns):
Names Report
Andrea ---- Bruno ---- Darren
Austin ---- Cathy ---- Francis
Barbara ---- Chis ---- Gabriel
Bob ---- David ---- Gerald
....... ---- ....... ---- .......
Edit: If I run the report and click on "Print Layout" button, I can see multiple columns. Can I set this mode as default?
For Horizontal layout of labels...
One choice is to use the columns property on the report or body elements.
This doesn't always display correctly On reportviewer. I've noticed that even if it displays correctly on your IDE and when you export to PDF. In the report viewer it will display only one column. Also it snakes the labels top to bottom then left to right.
One choice is to use a matrix and group on every 3 rows (if you want 3 columns).
This one is a little complicated.
My solution of choice is to put 3 vertical lists on the page. put the same label in each list. Return the row number in your dataset. Then just filter each list on modulo 3
For example
Result set
RIndex Fname
1 abe
2 burt
3 fred
4 george
Filter expressions
list 1 -> =Fields!RIndex.Value mod 3 = =1
list 2 -> =Fields!RIndex.Value mod 3 = =2
list 3 -> =Fields!RIndex.Value mod 3 = =0
Result
Abe Burt Fred
George
The method I use is a bit similar as what Vern suggested but differs enough to make it worth mentioning here.
You can combine the ROW_NUMBER with the modulo (%) operator directly in the query to fabricate the column number in which the record should get displayed. Here's an example that generates one while taking a group into account:
declare #numberOfColumns int = 4;
select dpc.EnglishProductCategoryName, dp.ProductAlternateKey
, (ROW_NUMBER() OVER (
PARTITION BY dpc.EnglishProductCategoryName
ORDER BY dp.ProductAlternateKey) + #numberOfColumns - 1) % #numberOfColumns + 1
as DisplayColumn
from dbo.DimProduct dp
inner join dbo.DimProductSubcategory dps on dps.ProductSubcategoryKey = dp.ProductSubcategoryKey
inner join dbo.DimProductCategory dpc on dpc.ProductCategoryKey = dps.ProductCategoryKey;
To get this displayed I'm using nested tables which are then filtered on DisplayColumn.
Have a read through following article for all the details: Creating Multiple-Column Reports
Use the 'Report' menu in Visual Studio and select 'Report Properties'. You can set columns in the 'Layout' tab.
Try this msdn article about newsletter-style reports for more details: http://msdn.microsoft.com/en-us/library/ms159107.aspx
This method does have a limitation though so in some cases it might not be applicable:
Only PDF and Image renderers support
newsletter-style reports.
EDIT:
So one approach is to use multiple tablix with a filter that checks RowNumber and accordingly displays particular records in each table.
The other way is called Newsletter-style report (link). This formatting is retained only when report is exported as PDF or Image. It can be previewed only when you select 'Print Layout' on the Preview tab in Visual Studio. Here is an example:
Create a new report with the foll. dataset: SELECT ID,NAME FROM TABLENAME
Add a new table to the report and select the ID and Name as columns
Click on the tablix and press F4 to edit the tablix properties. In the properties window, change the Size - set the width to 2in
Click on the report area outside the report page boundary and press F4 to edit the report properties. In the properties window, change the Column value to 3, and column spacing value to 0.1
On the report scroll to the right hand side, you will notice that there are 2 new columns (so totally 3 columns on the report - because you selected 3 in step 4 above). Now click on the margin at the start of the column 2 and pull it further to the left to bring it as close to the column 1. This is only to reduce the need for huge page size.
Right click on the report area outside the report page boundary and select Report Properties. Change the Page Size - Set the width to 10in
Preview the report. Now select the 'Print Layout' tab to see the result. This formatting is retained only when report is exported as PDF or Image.
As noted in points 5 and 6 - since the report body flows into multiple columns, you must ensure that the page size is at-least equal to -> ([Original report body size times the number of columns] + all the column spacing values). Otherwise it will look messy.