Reports :: Hiding Rows Based On Cell Value
Aug 21, 2013
I have generated a report with my entire list of personnel, and I have created a column that generates thier age based of another column using this:
=DateDiff("yyyy",[Birthday],Now())+Int(Format(Now(),"mmdd")<Format([Birthday],"mmdd"))
Now my question, im trying to hide the rows of those who age is older than 26. If thats not possible maybe highlight the entire rows of those under 26, i used conditional formatting to highlight the age, but not the entire row.
View Replies
ADVERTISEMENT
Oct 6, 2013
I have a report where I number pages based on the Store (muliple stores in report but page numbering resets when Store changes) I do this by manipulating the page number field on the report by code in the report sections to reset it and to increment it.
Code:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me!PageNum = 0
End Sub
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)
Me!PageNum = Me!PageNum + 1
End Sub
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
Me!PageNum = 0
End Sub
The report has a Page Header with various fields and labels and that's been fine however I've had a request to hide a field on subsequent pages (i.e. print it on the 1st page of each store then hide it).
So I added the following code to various sections, but can't get it to work correctly. The fields (label and text box) appear on Page 1 for the first store then get hidden but never return even though when I step through the code it is functioning 'correctly'. The GroupHeader code is performed but the fields don't get displayed on the report. I think is isn't re-painting that section but adding code to the Paint event does nothing, and in fact doesn't actually get run, so not sure when that event is triggered.
Code:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me!PageNum = 0
lblMemberNo.Visible = True
MemberNo.Visible = True
[Code] ....
View 3 Replies
View Related
Jul 24, 2014
I have a report that I would like to have the rows be a specific color based on the value in 1 field on the row.
I have attempted to use conditional formatting but it will not work (IE, I can get font color to change, but not field boxes to have color).
The field is labeled [text144] based on the value in the field (1,2, or 3) I would like the field to be a different color.
i.e.
3 = green
2 = yellow
1 = red
View 4 Replies
View Related
May 20, 2013
I am a beginner in SQL, I have a problem regarding combining rows/ columns having value. Below is my example:
Table1:
1 123 23 43
1 234 3 431
2 34 34 34
2 54 3 123
3 1 32 32
2 341 1 32
Output Table:
1 123 23 43 234 3 431
2 34 34 34 54 3 123 341 1 32
3 1 32 32
or instead of combining rows, getting the result by combining columns with the same condition.How can I obtain such result?
View 3 Replies
View Related
Sep 18, 2012
I need to export a list of data into a single cell in Excel.
As an example the list looks like this in Access:
450a
650b
320c
4100d
and exports into individual cells. I need it to export into one cell and look like this:
450a, 650b, 320c, 4100d
View 4 Replies
View Related
May 7, 2014
I'm a new to Access, SQL. I need the following output:
Input:
PHP Code:
PO Vendor State
a, b 1,2 IL
c, d, e 3 TX
f 5 CA
Output:
PHP Code:
PO Vendor State
a 1,2 IL
b 1,2 IL
c 3 TX
d 3 TX
e 3 TX
f 5 CA
I found the following SQL code from another forum, which splits entries in a cell separated by commas into 2 rows, output being:
PHP Code:
PO Vendor State
a 1,2 IL
b 1,2 IL
c 3 TX
d,e 3 TX
f 5 CA
SELECT * INTO ImportedData
FROM (
SELECT PO, Vendor, State
FROM SourceData
[Code] ....
How to run a loop so that if a cell has n entries separated by commas, I want them to be split into 'n' number of rows.
View 3 Replies
View Related
Jul 9, 2014
I have a database (small one which i designed)
I have created all the tables.
I then have a "form" called July-14 (i need to figure out how i can automatically replicate this form for new months)
Anyway, one of the cells pulls out a product name (using the lookup wizard), i then have a cost cell which i would like to populate automatically based on the product name.
The table July-14 links to a product table which has ONLY those 2 attributes in there, the name and cost.
How do i get it to pull the cost automatically.
View 5 Replies
View Related
May 8, 2006
I'm new to this forum and I'm sorry if this is a repeat question...I looked in previous threads, but could not find my particular questions.
Here's the situation:
I enter a bird name in my form (I've set up a combo box of 200 choices). Each bird species has an max and min possible wing measurement. So when I enter a newly captured bird in my form, the wing measurement must fall between the minimum and maximum for that particular species. I've done similar things with cascading combo boxes, but can't figure out how to the do a between-type statement in this situation.
Thank you much,
Erik
LSU, Baton Rouge, LA
View 9 Replies
View Related
Dec 17, 2004
Hi,
I have a command button that opens a report. The report has many subforms in it. I am sending open args which existingstewardship. I want one of the labels of the labels to be visible if the me.openargs = "existingstewardship". the code is not working. I have tried to debug when I do this I have found the open args are null and I am wondering if the open args are null is this because they were sent to the main report from the command button and the subforms in the main report do not get passed the open args.
Does anyone have any idea ? how I could make the box visible or not visible in subreport from the command button. The other option I have would be two different reports. Thanks PWF
View 1 Replies
View Related
Mar 16, 2015
I have a report which shows a set of events. In this report each row has a sub report which show the guests that are attending. What I would like to do is to use a button to drill down into each individual event and hide it again on clicking the button (like a toggle button). I have used the following code which is attached to a button in the report (each event has a button)
Code:
If Me.GuestSubReport.Visible = True Then
Me.GuestSubReport.Visible = False
Else
Me.GuestSubReport.Visible = True
End If
I have used this in conjunction with the 'Can Grow' option and it works almost perfectly. The only problem is it shows or hides all sub reports at the same time instead of just the sub report in the given row.
Is there a way I can target the individual sub report when pressing the button?
View 2 Replies
View Related
Sep 5, 2014
I wish to use the conditional formatting that if the date required has passed the current date - i wish for everything for that record be turned red when searched or printed.
ive managed to make the Date Reqd turn red but i dont know how i will make the other cells follow the conditional formatting from another cell?
My other Cells i wish to change to red from the Date Reqd are - Customer Code, Site, Plot No, Product
View 14 Replies
View Related
Aug 30, 2014
I got a problem about form designing. i need to disable my Close Command button while my subform Price cell is null and enable the Delete button.
And while delete button is pressed the delete action occurred and close button enabled.
View 12 Replies
View Related
Aug 26, 2014
I am trying to write some vba code to auto fill a cell's value based on the value of the cell in the previous record (In a datasheet form) i.e. if the value in record one was '1' and the down-arrow key was pressed then the value '2' should be entered into the new ext record
I have written some pseudo-code to show what I am trying to accomplish:
if keydown = down-arrow and current cell contents isnumeric then
Cval = current cell contents
if current record = last record then
create new record
move down 1 record
set cell value of new record to cval+1
else
move down 1 record
if cell value = null then set cell value of record to cval+1
end if
end if
View 14 Replies
View Related
Jun 13, 2013
I search around online and did come across much info on code to how to hide fields. But, the problem is I cant seem to find a way to hide a certain amount of fields based on a number amount.
example: Lets say I have a 12 text fields to show 12 months of monthly payments, and lets say a client only has a 3 payment term. How can I list 3 under installment field and have remaining 9 fields auto hide since they wont be necessary? this way I only see what applies and not additional text fields.
View 1 Replies
View Related
May 5, 2014
I am trying to hide a text box based on the contents of another text box in the same report. Here is the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsEmpty(Me.DocFullName) Then
Me.Text55.Visible = False
Else
Me.Text55.Visible = True
End If
End Sub
i.e. I want Text55 to disappear if DocFullName is empty.
I thought my code was OK, but it refuses to co-operate.
View 5 Replies
View Related
Dec 26, 2013
My form: "Dailyissue"
My attachement field: "Attachement_1"
I attached an image in Attachement_1, I want to set that image in a cell of excel using VBA. How can I do it? (I don't want to read the image from the PC, I want to use the attached image).
View 1 Replies
View Related
Jul 22, 2013
Table 1:
Account Number
Start Date
End Date
Cost data**
Budget data**
Table 2 (Imported excel file with cost/budget data):
Account Number
Cost data**
Budget data**
Table 1 is the main table that will be viewable in this database. The idea here is that new Account Numbers can be added to Table 1 throughout the year. It then pulls the cost/budget data into Table 1 based on the matching Account Number between table 1 and 2.
So, if the Account Number (Table 1) = Account Number (Table 2) then it pulls the cost/budget data into the cells on that row. I am trying to make this automated since this data is updated weekly and imported into Table 2 from excel.
View 4 Replies
View Related
Oct 16, 2013
I have frmIncident that has a 2-column combo box (cmbIncidentType). Column (0) is IncidentType, Column (1) is YES/NO. This combo box feeds from a Query and currently has about 15 "types" of which 4 have a "Yes" tied to them, then rest "No".There are situated on a TabControl (tabIncident) with 5 sheet tabs. If the Incident Type selected in the Combo Box has a corresponding "Yes" in Column (1) then all 5 sheet tabs need to be visible. If it is "No", then only three of the five are visible. Here it he current code I am using for the AfterUpdate event on the combo box:
Private Sub cmbIncidentType1_AfterUpdate()
If Me.cmbIncidentType1.Column(1) = "Yes" Then
pgEmerIncidentRpt.visible = True
pgNarrClose.visible = True
Else
[code]...
When I open the form is will set the proper sheet tabs that need to be visible, however once I cycle to the next record, or select a different Incident Type, even one with a "YES' in column (1), it will only show the (3) sheet tabs. I can never get it to show all 5.
In the code, the only (2) sheet tabs that need to visible = true or visible = false are shown, starting with "pg".
View 3 Replies
View Related
Dec 29, 2014
I have a report based on a query with 3 fields (Tested, RMA, OpenRMA). The query searches all the tables in my database and gives me a count of the equipment tested, RMA reported and open rma.
The report has two fields (Equipment, NumberTested) with a total below and also a total of the RMAs and OpenRMAs. I'm trying to hide RMAs and OpenRMAs from appearing in the body and only showing below the total. All three totals are showing correctly, but I am still seeing RMA and Open RMA with a null in the count in the body.
So in the report's Equipment.control I wanted to put
Iif([NumberTested] is null, null, [Equipment])
Meaning if the numbertested field is null the equipment field will be blank, if it is not just leave what is in the equipment field there, but it returns a #Error in the printout. It seems to handle the two null records correctly. Trying Equipment.Value also returned the same error.
View 6 Replies
View Related
Aug 7, 2013
I want to use VBA to hide columns in a subform based on what is checked in a multi value look up field.
I am creating this DB for use with sharepoint as a web database, which is why I am using the lookup field to begin with. There will be a client DB to use with some VBA code
So what I have is a lookup field with tests "Test 1, Test 2, etc" on form sample.
There is a subform called results, and I want to hide certain columns based on what tests are performed.
I tried using an If Then statement (code is being run on subform load)
If Me.Parent.fieldTest = "Test 1" Then
Me.Test1Col.ColumnHidden = False
Else Me.Test1Col.ColumnHidden = True
That is basically the code I was trying to use. I am getting an error 13, which I assume is because fieldTest can not = something since it is a multi value look up field.
View 3 Replies
View Related
Nov 24, 2014
How much formatting can be done to a report from Access into Excel? I am trying to (or will be in the next day or so) to create a report to export data and I would like it presented in a specific format. This is hopefully to replace a spreadsheet where someone currently has to collate and re-type a load of info that has already been typed into various other spreadsheets.
Access is going to happily cope with all of those users entering their data to a table, and I would like to be able to output that data to something similar to the end result now? Is there a way to have an Excel template file and simply direct Access what to put in which cell?
View 14 Replies
View Related
Sep 24, 2014
I have a table of about 250 items that are sorted based on two fields. I created a query of the table and hide one of the fields because it is only there for sorting purposes to group the data.
For example, I have a "Type" field. In the type field, I differentiate the items with different categories, such as "Materials", "Safety", etc. My next field is "subtype" which assists the "Type" field being sorted properly for my needs. In the "Materials" category, all of the items are either "Fencing", "Plastic", "Wire", or "Miscellaneous". I am sorting the "type" and "subtype" fields in ascending order so that all the "materials" are grouped together, and all of the "fencing, "plastic", etc are grouped together within the materials field.
I am creating a printable report and I do not want the "subtype" field to be on the report, but I need the "subtype" field's sort to be affecting my data so it is grouped properly. I'm having difficulty, is there a way to hide fields in reports?
View 3 Replies
View Related
Mar 26, 2014
I am using Microsoft Access 2010.
I have a form, having following fields
Nationality, Combo box, Options are Indian/foreign State: With list of States in India.
What I want is, when data entry operator , select, Foreign, State field automatically hides.
And when data entry operator , select Indian, State field shows in the form.
How this can be done in Access 2010
View 5 Replies
View Related
May 8, 2007
Hi all,
Very very new to Access, moved department a week ago and inherited a couple of databases that need tweaking. Although I'm learning I am stuck by something very simple and can't find it by searching this forum or Google :)
I have a query that originates from 2 tables, there is one custom record made from 2 of the fields -
Free Stock: [stk_stkqty]-[stk_allstk]
Now I want a record that shows -
Product where the free stock = backorder stock
so theroetically my guess as a beginner is -
SELECT * FROM [Product] WHERE [Free Stock] <> [Back Order]
But it fails miserably on syntax. Can someone point me in the right direction, and I apologise for my lack of understanding in advance.
Boofuls :)
View 5 Replies
View Related
Jan 14, 2006
I'm developing a complex form that will pull records/fields from a number of tables. The form is designed in a tabular form - with a form showing a number of "logical" records - each of the records consisting of fields from a number of tables.
The first column of the records is genetated using a query that results in a unique set of values. When originally displayed the second (and the other columns) will have null values. What I want to happen is that when the user goes to the relevant second columm in a row he is displayed with a drop down list of possible values depending on the value in the first column/row. The possible values being determined by the a query on another table given the first column/row.
as a concrete example a form will display the following 3 rows, each with 3 fields. The first field having a country displayed:
row_1 <USA> <null> <null>
row_2 <UK> <null> <null>
row_3 <CAN> <null> <null>
When the user selects row_1 in the second column then a combo/list box should display the hotels appropriate to the USA - and the hotels being found by a query on another table based on the "USA" value in the first field in the row. Likewise if the user selects row_2 and the second field the hotels in the UK will be listed in a drop down box.
I've tried parameter driven queries and that does not seem to allow specific column/row values to be fed into thea query - neither does event notifications seem to be able to have a function parameter of the colum/row value so a VBA query could be issed
Any on have ideas how I can do this?
John
View 7 Replies
View Related
May 23, 2005
Hi everyone, I am hoping to learn something new about access today. What I need is to be able to run a query that gives me rows of data based on paramenters that I specify. For example, I will query this all just on one table and I want to come up with an output that is in a nice format as follows:
Parameter..........................Member Count
01/01/04 thru 01/20/04...............298
02/01/04 thru 02/20/04...............287
03/01/04 thru 03/20/04...............301
04/01/04 thru 04/20/04...............254
And so on, usually for a calendar year.
Basically each member has an effective date, like member A might have 01/15/04 effective date and member B might have 01/02/04 effective date. I need to capture the count of members by month based on their effective date range. I would like to do it all in one query like above instead of just running a query for January, then February, then March, so on.
Is there a way to do this? Right now I am just running a query and getting one member count at a time and copying that number to an excel spreadsheet. it works okay, but is time consuming. I would rather semi-automate things for me. Any ideas?
Oh and I am new to access, by no means an expert, so be gentle with me.
Thanks,
Hanna
View 2 Replies
View Related