Reports :: Preventing Fields From Being Displayed?
Jun 23, 2015
im working on a report at the moment that will generate a standard NIP (nutritional information panel, similar to whats on the back of pretty much all packaged food products, see link below for an example)
[URL]
this in itself is pretty easy, however depending on which market we're selling to, different countries have different requirements for which data is to be shown, ie some markets might require we show how much sodium but not how much fiber, others might require us to show how much carbs and sugars but not how much vitamin C and so on (all up there are 16 different variables for nutritional info, due to size requirements on our packaging we cant simply display all 16 all the time)
at the moment im designing a form which has a drop down box (for the user to select a product) and checkboxes for each of the 16 variables (kilojules, carbs, iron, trans fats, sat fats, etc) following this ive got a report that has all 16 variables on it
i can make the variables that arent ticked on the form invisible (by adding a bunch of IF or Case statements, on print of the report, that determine whether the corresponding checkbox for each variable has been ticked and setting the "visible" attribute to true or false accordingly), however when they are invisible there is still a blank space where the field is meant to be ive got all the fields grouped together, is there any way of making fields invisible and then pushing all the visible fields together so there are no blank spaces?
I am trying to modify an inventory management database. I want to prevent duplicate entries to specific fields in centralized table. The table is called Work Stations. Its function will be to track various computer equipment by a specific work station name. Each of the items will have a unique asset tag.
The primary Key for Work Stations is WS-ID. The fields I am trying to prevent duplicate entries in are WS-Computer, WS-Docking Station, WS-Monitor_1, WS-Monitor_2, and WS-Switch. Each of those fields are primary keys in 4 different tables that conation more detailed information about item. The exception is WS-monitor_1 and WS-Monitor_2 have a one-to-many relationship with Mon-Asset Tag in the monitors table.
The goal I am trying to accomplish is when a work station ID is created or modified duplicate entries are prevented to those fields listed above. The computer, monitors, docking station, and switch fields in the work station table may contain data or may be null.
I have tried to set the Indexed Option to Indexed (No duplicates) for each of the fields and I have also tried setting Yes to Ignore Nulls in the index option on the table design tab for the individual fields. Both options have returned the same error stating the changes would create duplicate values, in the index, primary key, or relationship.I have not created form for this table yet as I was trying to get no duplicates option to work first. I have verified the data and the only duplicating fields are the Null fields
I have a query that pulls the records by month and year this worked great
Query is set up as Field: Month: Format([ErD],"mm/yyyy") Criteria: [Enter Month and Year (mm/yyyy)]
But I need the Month that is pulled to display in the report header along side the report header text without the user needing to enter the Month again. Example report header: January Things you need to know.
Some of my collegues have been experiencing this problem with a very simple database i knocked up for them. First off some background. I have a main form (frmproperty) with 3 subforms linked to it(frmroomdata, frmlocation and frmsample). by a property code. Two of these subforms are linked (frmlocation and frmsample) these are linked by location code which is an autonumber.
These are laid out so that you fill in room data first, then location data then finally sample data. However after the location data has been filled out and a user attempts to move to the first combobox on the sample subform a message pops up saying that another user has altered the database and would you like to save changes (Impossible as they are using the database on a local drive). After this happens they reopen the form and in all the frmsample fields is "#deleted"
This doesn't happen every time...infact over the last 2 days i have been entering data myself to try and get this error with no luck. Has anyone else come across this and know how to fix it?
How to prevent duplicates on the combination of two fields - text & numeric?
I'm currently using the code below that warns users when the combination of two fields have already been used. (Combination of the TWO fields has to always be unique so if used again will warn the user)
Works well when both fields are numeric but fails when the JobDetails field is changed to text in the main table (tblPPMPLanner)
Code: Option Compare Database Option Explicit Private Function IsDuplicateRecord() As Boolean On Error Resume Next Dim PreviousRecordID As Long IsDuplicateRecord = False
[Code] ....
The field that should be a text field is called "JobDetails"
I am trying to return the MIN in a numeric field (single result) from my database and I have no issues doing this BUT the problem is that I also need to display additional fields in order to make the result useful. The additional field can't be grouped by b/c that changes the result of the MIN function.
Where in Access 2010 I can modify the displayed fields of a Combo Box on a form. I need to format the display window and add criteria to one of the fields. Can't remember where I set this up and recently upgrading from Access 2007 isn't working.
I have a Form to Display Projects that has a SubForm displaying Sub-Projects related to them. The main Project Form has a Combo Box which allows a user to select a ProjectID to display. The SubForm has a ProjectID Field as well. When the Project ID is selected in the Main Form, only the appropriate Sub-Projects are displayed in the Sub-Form.
On the SubForm, there is a Field named ActionID, which uses the following VB Code to limit the availability of the Fields in the SubForm that apply to Dates. If the selected Action is Install, only Install related Dates should be available. Likewise, if the selected Action is Remove only Remove related Dates should be available.
Code:
If Me.ActionID.Column(1) = "Install" Then Me.AssetInstallMonth.Enabled = True Me.AssetInstallYear.Enabled = True Me.AssetRemovalYear.Enabled = False Me.AssetInstallMonth.Locked = False
[Code] ....
Everything seems to work as expected until there is more than one Sub-Project is the SubForm and they do not contain the same Action. In these cases, it appears as if the Sub-Projects in the SubForm are not being treated as individual records. If Sub-Project is Added or Modified to have an action of "Install", all records are treated as Install Records (only Install related Dates are available), regardless of their content.
Is there a way to update the properties for only the row that has been selected?
In my tables i have used calculated fields. one of the fields is to "total expenses." In a report, i need to show the sum of all the "total expenses", the filed populates in the report but the cents are missing. for example if the amount is 6080.40 it shows as 6080. how can i get around this? I have tried changing the decimal point value to 2 at which point the value turns to 6080.00 when it should be 6080.40 (i am a beginner at this i am assuming the answer will probably involve c++ or visual basic's, two concepts i am not familiar with.)
I am trying to get calculated fields in my report to work but zero values in the data are throwing up #Div/0! and #Error! and #Num!
The main data fields I am trying to work with are:
VehicleReading PreviousReading VehicleLitres
My aim is to track mileage and consumption for a fleet of vehicles and show daily and weekly averages in mileage and consumption and then to flag 20% increase in consumption.
I have a calculated field in my report named Kilometers,
= [VehicleReading]-[PreviousReading]
and also a calculated field named Consumption,
=[Kilometers]/[VehicleLitres]
My sum and average calculation fields in the group footers are only working where there are values above zero in the Kilometer and VehicleLitres and Consumption fields.
In reality there are some days where there has been no travel, so some records will have a zero for the Kilometers field and there are also days when there has been no refueling so there is a zero for the VehicleLitres field.
I have tried using the expression builder to create an IIf function but to no avail.
I have tried copying the syntax suggested by the Expression builder:
«Expr» IIf («expr». «truepart». «falsepart»)
I know I need to get those zero's to fail in the calculation but as I said before all of the suggested expressions I have tried fail due to syntax!
Any way in report that I have 2 reference queries just 1 is to populate all details and 2nd query to filter details and will be the final reporting information???
I have a form and within that form there is two combo boxes and one text box. When one choses a value from one combo box, and then chooses a value for the other combo box and then enters the value into the textbox I don't want the user to be able to enter the same arrangement. That is I want to prevent duplicates on that combination. Also if they do this I want a Message Box to appear saying that that this combination already exists
I was thinking of using a multiple field index to prevent the duplicates, but I don't know if this is a wise thing to do. Can someone give me some help to see how I can prevent duplicates or offer another solution to prevent duplicates on the combination of the values.
Hi, How do you normally prevent duplicates being inputted into you forms.My Idea is thisThe input text box doubles up as a dropdownlist of current values held in the database for that field.So when you access the organisation form and go to the first text box as you enter the 'I' for IBM All the orgs with 'I' appear. When you see that the organisation your inputting already exists you will stop and move on to the next form.I dont know how to do this, so currently I have set the field OrgName as Indexed: Yes (No duplicates) but this isnt really any good as the user enters all the other details and clicks submit before the error message comes up.I have attached my file for you to understand this better.
I have a report that has category, subcateogry and districts.
I can get the first part of the report to work as I want it like so:
Category FruitSub Cateogry Apples OrangesMeatSub Cateogry Pork Chicken Now is where the fun starts. I want next to each of the subcateogries a count of districts, but I want to name of the districts to be at the top, and the counts to go underneath - here is 2 lines to show what I would like.
Category District Name FruitSub Cateogry 2Apples 3Oranges0 The red text "District Name" would be 4 different districts, going across with the counts under the related districts.
I can not get the districts to show up at the top of the report next to cateogories, and go across with all of the districts, it keeps on wanting to list them underneath each other.
All reports that I have seen have a "set" header, not one created on the fly according to a database.
Is this possible to do, and if so, can someone point me in the right direction?
I have two reports, "Quick Glance Report" and "Note Report". The Quick Glance Report comes from a query called (ACE/ARB Table Query) and the Note Report comes from a query called (notequery).
I want to be able to have a calculated field from the "Note Report" in the "Quick Glance Report". Am I able to show a calculated field from one report into another report and how would I do this (If I can that is)?
I have a report about bowlers & series. I am attempting to do a running sum on each bowler's series & games bowled each week, so I can get a new composite average each week.The data looks good until the 2nd to last row of data. The running sum on series & games bowled for every bowler is blank even though I have a series that week for all bowlers. And the averages for that week show a 0. The very last row of data for all bowlers is fine and correct.
Hi I would like to prevent the first 24 rows in a table from being deleted by the user, after these 24 rows they can be deleted. Is there anyway of protecting them etc without putting them in a separate table?
Hi I have a Switch Board and when I click to view a report on it the report automatically opens in maximize view, this is what I want. What I dont want is when I close the report for the Switch Board form to be maximized as well
How would I be able to prevent this?? Cheers bikeboardsurf :rolleyes:
I have developed a database in Access which has user permissions implemented. These are set so that only Full Data Users have permission to delete information.
However, it has come to my attention that users can get around this by creating a query and then deleting records displayed in its results. I can't understand why this is possible, because the permissions should prevent this.
I have a table with a blank record at the begining and populated records thereafter. I used the cmd button wizard to create a delete button for that table. Is there a way to prevent the blank record (record 1) from being deleted by the command button but still allow all other records to be deleted?
Hi all, I am currently using this code in the before Update event of the Surname Textbox on a form. The first Textbox is FirstName. The second one is Surname.
If (Not IsNull(DLookup("[FirstName]", _ "Employee", "[FirstName] ='" _ & Me!FirstName & "'"))) And (Not IsNull(DLookup("[Surname]", _ "Employee", "[Surname] ='" _ & Me!Surname & "'"))) Then MsgBox "Someone already exists with the same name! Please check for duplicates", vbCritical, "IPDMS" Me.Undo End If
However once the user has entered the surname and tries to save the record the MsgBox is coming up. Basically what is happening is the first name is coming up as the duplicate entry only. I need to prevent the whole name (first name and surname together) from being duplicated.
Hi all, I've got a database with a members table and an events table and a participation table which is like an 'intermediary table' which just has fields for MemberID_fk and EventID_fk.
The form at the moment has a combo box for Members and a combo box for events. This works well but the problem with it is that there is no safeguards to prevent a member from joining the same event many time.
Ideally i'd like for the combo box of events to be updated once the member's been selected to only include events the member has not signed up for.
If anyone's got any suggestions i'd love to hear them. The only constraint i have is that this has to be prevented when it is entered in the form.