473,554 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter on repeated IDs

2 New Member
Good day,

I'm creating a db to trace activities done by students where I've created a table with the following columns:
1. StudentID
2. StudentName
3. Birthday
4. Activity
5. ActivityMonth

Then I've Created a form to preview there activities with the same columns

Then I created a textbox where I want to assign a code to filter form as following

I want to write a number for example 3 and I want to filter the form for the students who has participated in 3 or more activities based on their StudentID

so the filter will show all the students who made that number based on their studentID

Many thanks
Nov 26 '20 #1
2 3012
457 Recognized Expert Moderator Contributor
As each student can have many activities and each activity could be done by many students, this data needs to be in three separate tables to include these fields:

StudentID-PK field
FirstName (as 2 separate fields)

ActivityID - PK field

tblStudentActiv ities
StudentActivity ID - PK field
StudentID - FK field
ActivityID - FK field

The table tblStudentActiv ities is a junction table linking the other two tables.

Next modify the form record source accordingly with data from each table

The filter can be done in various ways. One is based on an aggregate query where Count(StudentAc tivityID)>=3
Nov 26 '20 #2
2 New Member
Thanks for the reply, the thing here is that the activities assigned won't be repeated so there is no need to assign IDs to it.

However the students id will be repeated
So I need to filter on it only

As I mentioned earlier I want to assign a code to the Txtbox that will show the repeated IDs on the form

Nov 27 '20 #3

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

Similar topics

by: Tom Anderson | last post by:
Comrades, During our current discussion of the fate of functional constructs in python, someone brought up Guido's bull on the matter: http://www.artima.com/weblogs/viewpost.jsp?thread=98196 He says he's going to dispose of map, filter, reduce and lambda. He's going to give us product, any and all, though, which is nice of him.
by: Wolfgang Lipp | last post by:
<annotation> the first eleven contributions in this thread started as an off-list email discussion; i have posted them here with the consent of their authors. -- _w.lipp </annotation> From: Eric van der Vlist Sent: Tuesday, 27?January?2004 13:53 Hi,
by: Brad | last post by:
I have a response filter which injects "standard" html into my pages. The filter works fine when the initial stream is small enough not to buffer...or....if I have a large unbuffered stream (i.e. I set buffer=false on a large page). Now the problem: If I turn on buffering on a large page, the page output (to the browser) is correct a few...
by: Russell Smith | last post by:
Postgresql 7.4.5 The following VACUUMs were run within a couple of minutes of each other completing. This table concerned is a table that has not been changed in a long time. (a month) There were open transactions at the time the vacuum was run. These were created by having PHP running with postgresql. At least that is what I have managed...
by: bagelman | last post by:
Hi, I have a string Array. Its length is 100. I want to search the array to find repeated strings in it. And after finding repeated strings I want to write to screen which word repeated how many times.. I thought that 2 array is necessary (one for storing repeated word the other is for storing repetition number) for this. But I couldn't...
by: virtualweb | last post by:
Hi.. Im saving States and Cityies from people answering a poll in a flat file database delimited by pipes. Flat file named States_Cities.txt The information is saved in this format: FLORIDA|MIAMI FLORIDA|JACKSONVILLE FLORIDA|TAMPA TEXAS|HOUSTON
by: C#_Help_needed | last post by:
I need help with the following question. THANKS :) Write a program in c# that takes in a directory as a command line parameter, and returns the longest repeated phrase in ALL text files in that directory. Assume that all contents of all the files may be held in memory at the same time. Do not use unsafe code blocks and/ or pointers.
by: Rich P | last post by:
Maybe you could try using a query as the recordsource for your subforms and for the criteria field in the query you could use a Form parameter. This way - instead of using the form filter property you could set a value in a textbox on your mainform which would filter the query. This way all of your subforms are synchronized. fieldname:...
by: Hagridore | last post by:
I may be about to surrender on this...I've asked in other forums and am not getting the answer I thought I'd get. I'm creating an Access database that I ultimately want to compile into a stand-alone app. As part of this, I have a dashboard that opens when the database is opened, with various buttons to perform various tasks, most of which...
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...
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...
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...
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...
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...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.