473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 1460
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
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...
6
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"...
5
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...
8
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...
8
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...
2
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...
1
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...
5
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:...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...
0
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...

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.