Alright, so I'm trying to run a query that to display a null value in a field if a duplicate ID exist. There are 2 tables, parent-child relationship. The parent table can have one to many child records. In my scenario, we have fuel tanks that can get many inspections done on them. Tank is the parent table and Tank_Inspections is the child table. There's a capacity data field that I'm getting from the tank table and joining it with the tank inspection record and it shows up twice if multiple inspections exist for that tank. This is fine, however I don't want to double count the capacity and only want to show it once. I've pasted the link to an image of a screenshot of how it should be displayed if multiple records exist for parent table. The highlighted cell should be blank. As you can see, the TankID = 65 has two inspections of different types, since I'm getting the capacity field from the Tank table, it's getting inserted twice. I was to write a query so if two or more inspections exist for tanks, only show the capacity once and "blank" out the other capacity data element. In this case, the highlight cell should be blank. Suggestions?
Related Questions in MS-ACCESS-2010
- Access query IIF statement not displaying result
- MS-Access and Sharepoint external data sources importing problem
- How to pull multiplier value from another table on query
- Access button feature lost after splitting
- vba replacing one line of code with two line of codes
- How to Subtract Credit aliases from Debit aliases for all rows?
- How to SETFOCUS to a control in a REPORT footer
- An .adp proj openning wih parameter
- Power BI - Calculating an S curve with a calendar and a tasks table
- Want to solve immediate Access VBA related question
- How do I get an MS Access Combo Box to modify not just the Control Source field but another field
- How to list shared remote desktop drives
- having problem in ms access login form vba,
- VB.NET / .NET 4.8: Syntax error insert into statement ... ALSO USER ID IF LEFT OUT KEEPS TELLING ME MISSING VALUE VISUAL STUDIO 2022
- Set focus to a particular column on empty query grid
Related Questions in QUERY-HELP
- Accessing the requested url with the query helper
- I need help parsing an HL7 string with TSQL
- sum based on max production date and min production date MTD,WTD, YTD SQL Server
- How do I join all rows with the same name in one table using MYSQL?
- How to Show Null in a Cell in MS Access 2010
- Need help developing SQL to find difference in date
- Calculate sum of absolute difference in rows by groups
- SQL Statement Help - Select Only Customers with no order for past 3 months
- MySQL - find difference between rows of the same table
- SQL query help with GROUPing and nested queries
- How to do conditional SQL Server statements?
- Mathematical formula for calculating call duration
- Update Statements
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
This sounds like a job for an analytic function. Since Access doesn't natively support these, there is a hack to accomplish the row_number() analytic function that sounds like it would meet your needs:
Achieving ROW_NUMBER / PARTITION BY in MS Access
You create a query that invokes this self-join and use that instead of the table. Once you have the row number on each row, it would look something like this:
And your capacity formula would change from
[Inspection].[Capacity]to something like this: