Queries :: Return List Of Students Attended Certain Number Of Sessions At Gym

Sep 2, 2013

I'm trying to return a list of students in a particular team who have not attended a certain number of sessions at a gym, between two dates. For some reason i get the error. At most one record can be returned by this subquery. (Error 3354).

SELECT [Student ID], Count(*) AS ["Number of Times Attended"]
FROM Gym_Attendance
WHERE [Gym Date] BETWEEN [Forms]![SV_Attendance]![txtStart].Value AND [Forms]![SV_Attendance]![txtEnd].Value
AND [Student ID] Like
(SELECT [Student ID]
FROM Student_Sports
WHERE [Sporting Team] = [Forms]![SV_Attendance]![lstTeam].Value)
GROUP BY [Student ID]
HAVING Count(*) < [Forms]![SV_Attendance]![txtNo].Value;

View Replies


ADVERTISEMENT

Queries :: Return Unique ID For Any Client Who Attended Any Event

May 2, 2013

I have a query to find only the unique clients that have attended an event during a time period

I can only get the event and client for each event

So I want a query that returns the clientID for any client that attended any event.

I have tried using the return unique values in the property sheet but that still gives me multiple clientIDs with each event they attended.

View 2 Replies View Related

Queries :: Number Of Students In Age Range

Sep 17, 2013

I have this formula for counting age groups

TOTAL 29 - 31: Count(IIf(DateDiff("yyyy";[DATE_OF_BIRTH];Date())>=29<=31;1))

But id does not work, if I use between 29 and 31 also do not work

I need to get count (number) of all students that have 29,30 and 31 year of age.

View 5 Replies View Related

Queries :: Return List Of Records From Original List

Apr 23, 2013

I'm looking to move an excel sheet to access because the row counts are too much.The main thing it does is compare the supplied data against a list I hold in the sheet.There are not duplicate records, however..Some data is a direct lookup for a full match, but much of it is a count to see how many records contain a certain string.

I have 500 keywords which have a countif function in using wildcards.I need to create a query/report which will return a list of records from the original list which contains each keyword featured and how many times it features.I was going to do it in PHPmysql but the time it took to parse a million records for every keyword made it pointless.

eg:
keywords:
look
billy
magic

list:
"have a look and see"
"spanish dave"
"who is billy brag"
"looky looky I go hooky"
"who's the man from argentina"
"could it be magic now"

my spreadsheet would return a 1 next to ""billy" and "magic" and would put a 2 next to "look".

the sheet has the keyword in each row and next to the column:
=COUNTIF(list,CONCATENATE("*@",B13))
where "list" is the external data.

View 3 Replies View Related

Queries :: Return More Than One Number?

Oct 24, 2014

i have a query with an inputbox for numbers [Enter Number]..if i want the query to return multiple numbers how would i do this? so the user could have 3 5 and 8 to search for, currently the [enter number] allows them to search for one at a time.

View 1 Replies View Related

Queries :: Return Values From A List

Feb 12, 2014

I have two tables, TBL_Students and TBL_Email. Each of these tables have a field called Category, which allows multiple values from a list.

Is there a way to return records from TBL_Students where at least one value in TBL_Students!Category = at least one value in TBL_Email!Category.

E.g. If Student A has categories Maths, Physics and Computing;Student B has categories Maths, English and History;Student C has categories Physics and Geography

I would expect:
when TBL_Email!Category = Maths,Physics : Students A,B,C to be returned
when TBL_Email!Category = Maths : Students A,B to be returned
when TBL_Email!Category = Physics,Geography : Students A,C to be returned

View 2 Replies View Related

Queries :: Return Number Before Letters

Mar 12, 2015

I would like to run a query which takes a code which contains a mixture of number and letter and returns all the number before the first letter. I was using the left function (=Left(([Codes],2)) but sometimes there is one number sometime two. The desired results are shown below;

7pol2try36 = 7
12cet9fre55 = 12
10yea3gtr77 = 10

Is this possible?

View 3 Replies View Related

Queries :: Return Char Number Value As Numeric

Nov 19, 2013

I have tried to use a bit of code so return the Last Year and WeekNo in my database, to select some records but�. It currently fails, I think this because it returns the values as text and will then not compare to a numeric field. Is there an easy way to change this code so it returns numbers.

qryCurrentWkYr

Code:
SELECT
Right(yw,2)
AS week,

[Code].....

View 3 Replies View Related

Queries :: Return Week Number On The Basis Of Date

Jan 23, 2014

I've been trying to create a query that will take a date and return the week number of the date.

My original date is formatted m/d/yyyy

I need my weeks to start on Monday and I would like the week containing Jan 1st to be the first week of the year

I have tried using the following function:

DatePart("ww",#12/31/2001#,2,1)

but the I get a result of 53 in this query, when I expected/need it to be 1.

View 4 Replies View Related

Queries :: ODBC - Return List Of Sub-accounts Associated With Main Account

Jul 28, 2015

I have a query which looks at a linked table (ODBC to SQL Server) in order to return a list of sub-accounts associated with an account. If I run it as a pass-through query it executes correctly, returning a list of the sub-accounts. If I run it as a query in Access it return the correct number of records but each sub account has the same name as the main account, as follows.

Result of pass through:
Main Sub
A X
A Y
A Z

Same SQL in Access:
Main Sub
A A
A A
A A

View 1 Replies View Related

Queries :: Return A List Of Rows Sorted By Service Type Ascending

May 20, 2014

In a query I'm trying to return a list of rows sorted by Service Type Ascending and then the last item in the list should be a row called "Add Edit Value".If I 'ORDER BY 2' then the "Add/Edit" row appears at the top which is not what i want.

My SQL:
SELECT '' As ServiceTypeID, 'ADD/EDIT VALUES' As ServiceType FROM ServiceTypes UNION SELECT ServiceTypes.ServiceTypeID, ServiceTypes.ServiceType FROM ServiceTypes
ORDER BY 1 DESC;

View 5 Replies View Related

Queries :: Counting Different Students Age From Same Table?

Sep 16, 2013

I have one table that has fields:
[ID]
[STUDENT_NAME]
[BIRTH_DATE]
[GENDER]
and I neet to get in qry where students will be counted by age and gender

For example:
younger then 15
tolal: 20
male: 5
female: 15

15-18 years
tolal: 34
male: 12
female: 22

Can this be done in single queri or should I do it in some other way?

View 2 Replies View Related

Queries :: Monthly Unpaid Students Finder Query?

Jun 23, 2013

i have 3 tables one for student information second for Van information and third is payment.

I want to know how to get the list of students not paid based on specific month which need to mentioned may b through a form.

View 1 Replies View Related

Tables :: Recording Training Attended By Staff

Jan 25, 2014

I have a database of staff members. There is a table with the details of staff; name, dob, address etc.

I need to set something up that will record the training that staff attend and then be able to print a report of who attended the training session and also a report of training sessions individual staff members attended.

I need to set up fields in a table for date, topic and presenter and then I need to somehow mark off staff members who attended.

View 5 Replies View Related

ACCESS & Sessions

Nov 28, 2007

Hello all!

I've got a problem...

My application is protected with username and password. According to the user who has done the log in, some options will be available and some not.

Then, are there sessions in access?? How can I know who is loged in with which role otherwise?

My idea is to have a table, and say, loggin ok for the user X, but there may be one or more users at the same time. Then, how can I know which user is who if two are logged in in the same application by remote connection?

bfffff.... hope i make myself clear...

View 6 Replies View Related

Counting Sessions

Apr 23, 2008

Hello,

Here is our problem:

id port connexion | idSession
1 20 1005 | 1
2 20 1005 | 1
3 20 1009 | 2
4 20 1009 | 2
5 20 1009 | 2
6 21 1009 | 3
7 21 1009 | 3

The first column is auto-incremented (primary key).
We would like the last column to be a counter which identifies each session regarding a port number and a connexion number.

Is there a SQL or Access function which would allow us to do that?

Thanks a lot.

View 2 Replies View Related

Asking A Text Box To Return A Number

Jan 28, 2005

Hi guys and gals,
I have compiled a very simple database to track staff and training audit requirements for my company.
I am 57 thick as 2 short planks and need some help please.
I wish to ask a text box called "Score" to return a number 2 if a yes/No box is "NO" and a number "1" if the Yes/No box is "YES".
I have looked at the help sections of Access and thought maybe an "IIf" statment in the Validation Rule section of the "Score" box might do the trick.
However, i haven't got a clue as to what the coding should be written like.
Can anybody help me please.

Basically i want to say
"If YES/NO = NO then SCORE = 2 but If YES/NO = YES then SCORE = 1"
Told you i was thick

View 3 Replies View Related

Forms :: List Box - Return To Top Without Selecting

Jan 22, 2014

I'm trying to create some VBA that will loop through my listbox, de-select all of the items, and then return to the top of the list without selecting the first item. Below is the code I am using based on what i was able to find through google, but the top item still remains selected.

Code:
With Me.AvailableAttendees
For SelRow = 0 To .ListCount - 1
.Selected(SelRow) = False
Next SelRow
End With
Me.AvailableAttendees.SetFocus
Me.AvailableAttendees.ListIndex = 0

View 3 Replies View Related

Return List Of Records That Fail To Append?

Sep 17, 2015

In short, I want to know which records fail to append based on violating the primary key. (Win 7, Access 2010 32bit) Similar to how Access creates import table errors, but for append violations...

The DB takes a daily data dump. Failures to append (in this DB) indicate a status of "complete" that needs to be re-examined. (A true complete will not be present in the daily file). The daily file also contains all new daily work, thus it isn't just a list of "completed" tasks to re-examine.

View 3 Replies View Related

2003 Runtime Multi-sessions?!

Jul 18, 2007

Hi All,
We're currently rolling out 2003 Runtime and I've had a few users requesting multiple open seesions of the same database. I thought sure no problem, and then found that it doesn't look like it's possible with Runtime.
Can anyone confirm whether there is a way around this?

It's just that they all had full version of 97 before and now were limiting them all to Runtime! :D

Any suggestions as always much appreciated.

Matt

View 4 Replies View Related

Class, Sessions, Attendees, What Is The Relationship?

Feb 6, 2007

After long, long, long hiatus of doing other stuff, I wanted to get around to update the database. One thing I had set up wrong was the attendance rosters.I just need to be able to create a new class, which may have more than one sessions, then make a list of registrants for a particular class, then be able to track their attendance per session for this class.However, my Google-Fu is lacking as every templates I've looked at doesn't really answer my question, which how three entities relate to each other.I know for sure that Class-Attendees is a one many relationship. Same attendee can register for more than one class, so that's no brainer. Likewise, Class-Session should be also be one many relationship for obvious reasons. However, if I relate Session to Attendee, it would create a circular relationship between the three entities. I've toyed with the idea of having a hierarchial tables of Class -> Attendees -> Sessions, but that does not relate the sessions to the class, which is necessary. I wonder if I should create a fourth table to contain attendances and use Session and Attendees as FK, but that still wouldn't fix the possiblity of a circular relationship?Any insights will be greatly appreciated. TIA

View 14 Replies View Related

Forms :: Return Number Of Matching Records

May 12, 2015

I have a datasheet form listing prospect information.

Each prospect is assigned a position, there can be more than one prospect with the same position.

I'm trying to get a text box to lookup the prospects position and search the remaining rows for matching positions and return the total number found.

This data does not need to be stored anywhere, just a reference value for users to look at.

View 4 Replies View Related

General :: Make A Text Box On A Form To Return A Number

Feb 25, 2013

I am wanting to make a text box on a form, to return a number (amount of records returned by a query)basically so if the query returns 5 records, the text box on the form will show"5",

Lets say the form is called "A", and the query is called "B" .How do I put this in the source control of the textbox ? < if this is right too ?

View 1 Replies View Related

General :: Return Max Number In A Field Then Increase By 1 For New Record

Oct 23, 2013

I'm using Dmax() to return a max number in a field which I then want to inc by 1 for a new record. Dmax is returning 999. I believe Dmax therefore thinks it's a text field. So where do I change this to a number field?

View 2 Replies View Related

Modules & VBA :: Multi Criteria DLookup - Return ID Number Of Entry

Dec 4, 2013

I am trying to make a DLookup function to return the ID number of an entry that matches 2 or 3 criteria but I am struggling to get the syntax correct for the second and third criteria.

Here is what I have so far:

1 criteria, works fine =DLookUp("[timedata]![id]","timedata", "[processdone] =" & Forms![Mainform]![p11] )

2 criteria, works fine =DLookUp("[timedata]![id]","timedata", "[processdone] = " & Forms![Mainform]![p11] & " And [timedata]![BGSnum] = 1001" )

BGSnum is a numerical value but it changes for each form I load, so what I want to do is use the form location value as the criteria.

E.g.

=DLookUp("[timedata]![id]","timedata", "[processdone] = " & Forms![Mainform]![p11] & " AND [BGSnum] = ' " & Forms![Mainform]![BGS] & "' ')

and possibly a third criteria too. This is where I am having problems and the syntax is wrong so MS Access wont let me save the macro.

View 6 Replies View Related

Modules & VBA :: Creating Appointment Based On Sessions - Send Method Not Working?

Jul 17, 2013

I have a module in my database that creates an appointment based on a table of sessions. The module works in all respects, except two:

1) When I declare optional attendees it sometimes shows them as required attendees in the actual meeting in outlook, but not always

2) The .Send method does not seem to work. It creates the appointment on my calendar as the originator of the appointment, but does not send to the other recipients.

Below is the code:

Code:
Private Sub SchedOutlook()
Dim rsEmployee As DAO.Recordset
Set rsEmployee = CurrentDb.OpenRecordset("Select * FROM Employee INNER JOIN tblSession ON Employee.EmpID = tblSession.EmpID;", dbOpenDynaset)
Dim rsMentor As DAO.Recordset

[Code] ....

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved