473,324 Members | 2,178 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,324 software developers and data experts.

Creating a statement to test for fraudulent activities in Access

Hi guys, im still fairly new to the world of databases. I have experience working in Excel and some experience in MySQL. My knowledge of Access is very limited and I've been stuck for over 2 days.

-My goal is to create a function where it will allow me to group all similar User_IDs. After they have been grouped, I need to run a check on the Create_Date_Time field to find any times that have a difference less than 4 minutes for each UserID and display those.

-That is only part 1, I also need to group User_IDs again but this time after they have been grouped, there needs to be a check on the customer names for similar entries. As in having same/close spellings, and then show the names next to the UserID again.

For the first one about time, I haven't the foggiest notion on how to build that in access. The second one I thought about creating a *like* function to help find the names. But once again, I am clueless on how to go about that in Access.

Please if anyone has any advice on how to go about this, I would love you more than Kanye loves Kanye!

Attached Images
File Type: jpg Pic.jpg (29.1 KB, 215 views)
May 7 '15 #1
4 1424
zmbd
5,501 Expert Mod 4TB
Normally we ask for only one question per thread; however, the solution sounds like it should very close for both questions.

The first thing that bothers me here is the term "similar" used for both user_id and User_Name.

You might find the following two articles located in our VBA answers to be of some inspiration:

[*] NGram Approximate String Matching

[*]Levenshtein Approximate String Matching

As for the results you are expecting... frankly I'm a bit fuzzy on where you are going. If you click on the [CODE/] button in the post-toolbar, using spaces (not [Tab]) you can insert text formatted into a table to illustrate what you are starting with and what you want to obtain.
May 7 '15 #2
Rabbit
12,516 Expert Mod 8TB
For both of your questions, you said you don't know how to approach it in Access. But the thing is, SQL in both MySQL and Access SQL is remarkably similar. If you know the query you would use in MySQL, it will be the same or mostly the same in Access SQL.

For the first question, in MySQL, you would probably join the table to itself where the time difference is less than 4 minutes. You can use the same query in Access SQL, it's just that the function you use to calculate the time difference might be called something else. For example, in Access SQL, you can use the DateDiff function, I don't know if it's called the same thing in MySQL. I'm assuming when you say similar User ID, you actually mean the same User ID.

For the second question, you said you were thinking about using Like. That same operator exists in Access SQL, it's just the wildcards are a litle different. In MySQL, you use the percent symbol, in Access SQL, you use the asterisk symbol.

On a tangent, I don't see how either of these situations necessarily point to fraudulent behavior. If names are similar, that's more an indication of a typo than purposeful fraudulence.
May 7 '15 #3
Yes, sorry I meant to same group the same User IDs together. I really like the idea of the Levenshtein string match! Rabbit, for the first question about the time, doesn't the DateDiff only do 2 times. A beginning and an ending? Is there a way I'd be able to apply this to an entire column?

Haha, I work for a sales company where we have reps. Some of the reps like to just make up names to go along with S.S numbers. the S.S numbers are run through the govt db, but manipulating the names allows for it to be entered. The times needed to also enter a app can not be closely related unless there are people sharing the same User ID. so it took about a min of 4mins to turn in a app, anything less means they are sharing IDs.

Thank you once again for all the help!
May 7 '15 #4
Rabbit
12,516 Expert Mod 8TB
While the DateDiff function takes 2 date time values as inputs, that doesn't mean they have to be static values. If you use a column as the input, then it uses the value of every row in that column. That's also why you join the table to itself, so that it compares each value against every other value.

There are many fuzzy string matching algorithms. Which one you use depends on your needs regarding space constraints, time constraints, ease of use, accuracy etc. Other algorithms you might want to consider are SoundEx, Metaphone, and Double Metaphone.
May 7 '15 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: alanknipmeyer | last post by:
Dear Sirs, Having previously used other SQL implementations I have grown used to having an audit trail to find when problems occured, the problem I am increasingly finding with Access is that...
0
by: Simon Jefferies | last post by:
Hello, I'm trying to create a new ASP. NET Web Application project, when I enter a name and press OK i get the following: Web Access Failed. The default web access mode for this project is...
1
by: David A Barajas | last post by:
Is is possible to launch an Access Application within another app, creating a Parent/Child relationship between the App/Access? I'm trying to create a system where I can distribute the Access app...
3
by: ALaurie10 | last post by:
Hi I have code below that enables a user to browse for an excel file, import the spreadsheet data, and dump it into a table . I keep receiving 3134 syntax error for "INSERT INTO" statement. Could...
1
by: KevinC | last post by:
Hi, I have a database that contains a table with an administration area and a number associated with the "count" of a certain characteristic of that area. For use in another piece of software...
3
by: veaux | last post by:
Adobe has WAY to many forums and I wasn't sure which was correct so thought I'd try here first. I'm trying to see if there is a product that will allow us to create a large (1,100 pg) directory,...
7
by: mlthomas007 | last post by:
Hi, A client asked for a code book (all fields, descriptions, tables, etc.) from our Access database. Has anyone had to do this? It seems to me there must be a way to extract all this...
2
by: TheArda | last post by:
Hi i want to create some type of options menu for my program. My Program collects bunch of data from an automated system , records it to an access database and trends it. I want to create an option...
2
by: dowlingm815 | last post by:
i have an complex IF statement, however, i am receving incorrect data when it becomes complex. the simple statement is ContractStatus: IIf(="Pending Legal","Pending Waiver",) additionally,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.