473,587 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Matching Records with user definable criteria.

I have a query where I defined three fields must match - Physician, Date
of Service and Claim#. No problem. Now I need to add parameters that
allow a user to define a 4th field= Procedure Codes. After typing in
2-5 different procedure codes will only want to see records where those
procedure codes occur on the same day, same doctor and same claim. Any
help would be greatly appreciated. Thank You.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
6 1471
I'm not quite sure I fully understand your problem.. but what are you
doing this for, what platforms? and are you only going to be using SQL ?

Nov 13 '05 #2
It is in Access 2003, thus far I utilized SQL

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3
What is the problem with continuing on with what you were doing and
matching up the new param's using SQL ? is it because it's 2-5 of them
and varying?

Nov 13 '05 #4
Each time I add my parameters to the SQL it appears to override the
matching portion. If a user types in procedure codes 1,2,3, these codes
will appear, but not for the same day, physician and claim#.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #5
Lets see the SQL statement

Nov 13 '05 #6
SELECT [Medical Detail].[Claim Number], [Medical Detail].[First Service
Date], [Medical Detail].[Servicing Provider Name], [Medical
Detail].[Servicing Provider Number], [Medical Detail].[Procedure Code],
[Medical Detail].[IW First Name], [Medical Detail].[IW Last Name],
[Medical Detail].[IW SSN], [Medical Detail].[Procedure Code
Description], [Medical Detail].[Invoice Number], [Medical Detail].[BWC
Authorized To Be Paid Amount]
FROM [Medical Detail]
WHERE ((([Medical Detail].[Claim Number]) In (SELECT [Claim Number] FROM
[Medical Detail] As Tmp GROUP BY [Claim Number],[Servicing Provider
Number],[First Service Date] HAVING Count(*)>1 And [Servicing Provider
Number] = [Medical Detail].[Servicing Provider Number] And [First
Service Date] = [Medical Detail].[First Service Date])) AND (([Enter
Code:])=[Procedure Code])) OR ((([Medical Detail].[Claim Number]) In
(SELECT [Claim Number] FROM [Medical Detail] As Tmp GROUP BY [Claim
Number],[Servicing Provider Number],[First Service Date] HAVING
Count(*)>1 And [Servicing Provider Number] = [Medical
Detail].[Servicing Provider Number] And [First Service Date] = [Medical
Detail].[First Service Date])) AND (([Enter Code 2:])=[Procedure Code]))
ORDER BY [Medical Detail].[First Service Date], [Medical Detail].[IW
SSN];


*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2396
by: David C. Barber | last post by:
I'm trying to determine if any matching records exist on a LIKE query performing a partial match of last names to a remote back-end database in the most efficient manner possible. LAN Traffic appears to be the bottleneck. This column is already indexed, and all I'm trying to determine is whether no records, or at least one record, exists. ...
6
8148
by: Sven Pran | last post by:
Probably the answer is there just in front of me only awaiting me to discover it, but: 1: I want to build a query that returns all records in one table for which there is no successful "join" in another table but I have not found what the field criteria should look like? 2: And if/when I succeed I should further like to build a new...
5
1819
by: Col | last post by:
I have a query with criteria that comes from a combo box on a form. I'd like to set the query up so the user can either limit the criteria to the selection in the combo box or the user can pull all records. Can't figure out a way for the query to pull all records. Currently uses the criteria !!. I've tried a couple of things to allow for the...
8
2058
by: mike11d11 | last post by:
I have a dataset with a account table and another table that contains transactions for accounts in the account table. I create a crystal report based off an inner join query of the two tables but takes way too long to generate. I was told if I can get them into one table that would fix my speed issue. I'm thinking if there is some way to...
8
1445
by: Neil | last post by:
I am running an Access 2000 MDB against a SQL 7 back end, using ODBC linked tables over a LAN and a WAN. The system has been operational for years with relatively few problems. Recently, WAN users have been reporting several hundred records disappearing at a time. The records are all sequential, and they're in a table that contains about...
2
4441
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for statistical purposes. I've been using Here's the situation: I have two main tables:
1
5582
by: Doug | last post by:
What is the simplest way to make a report where only the records where a field matches a certain date are included, and the user first selects that date (from form or popup)? (I can write the SQL to select the records I want...)
5
1809
by: perryche | last post by:
I am not sure if I am asking the right question in the subject here. But, here is my problem. I have 5tables/queries with various data like below. Table1: CustomerID1, Field1, Field2 Table2: CustomerID1, Field5, Field6 Table3: CustomerID2, Field7, Field8 (customerID1 does not exist in the table) ....
2
1160
by: Clinton M James | last post by:
Hi All, I have set up an access database that I communicate with through Excel and VBA. The purpose is to do auditing of staff. Because there are several audits, each audi has differing criteria to mark on, therefore the vba program I have made is dynamic in that the user can construct as many marking criteria as needed.
0
7923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.