I have the following SQL Query:
SELECT qry_q31_offence_types.Offence, -Sum([Male]) AS [Male Clients], -Sum([Female]) AS [Female Clients]
FROM qry_q31_offence_types
GROUP BY qry_q31_offence_types.Offence;
I have been trying to put in date parameters but I have been out of luck. I have tried...
Hi, I have the following SQL query. For some reason, the results it produces are very wrong. What I am trying to do is get a count of the types of offences committed by people (grouped by male and female) for clients admitted during a given time period. My query looks like this:
PARAMETERS...
Hi,
I have been using the following SQL code to find the average number of clients that are supervised over a selected time period. It works great. The date fields that it uses are [Probation Start] and [Probation Expiry].
PARAMETERS [Forms]![frm_Table5_AverageCount]![txtStart] DateTime...
Hi,
I am trying to figure out how to calculate an average daily count of clients that we supervise. I have all my data stored in a Master table called tbl_offenders.
From the tbl_offenders I would like the following fields:
Male, Female, Probation Start, Probation Expiry. Where Male and...
Hi,
I am trying to make a year end summary query with the Average Caseload of clients supervised. So what I want is the average Caseload from January, February, March, etc. and then add them up and divide by 12, to get a yearly monthly average.
The fields I wish to have a count for are...
Hi,
I have written a query and for some reason I am getting an error message.
My code is as follows:
PARAMETERS [Forms]![frm_dateparameter_q31]![txtStart] DateTime, [Forms]![frm_dateparameter_q31]![txtEnd] DateTime;
SELECT qry_q31_offence_types.Offence , -Sum([Male]) AS [Male Clients]...
Hi,
I have created a crosstab query which shows ethnicity as Column header and Disposition as Row Header. It works fine. My only problem is that the ethnicity values are taken from a lookup wizard, so instead of showing up as Aboriginal, Inuit, Other. They show up as 1,2,3. I would like to...
Hi,
I am trying to calculate the age that a client would be at the age of admission into our organization.
I know the current age would be found by:
(Date()-[Date of Birth])/365.25 AS [Age At Admission])
There are two ways by which a person may enter our organization, either Probation...
Hi,
I am trying to figure out how to put date parameters on a crosstab query, but am having no luck. Below is the SQL I have used to create my union query which I have called qry_Union_q30_Age_Disposition:
SELECT 'Probation' AS ConditionDescription, qry_AgeGroups.[Probation Start] AS [Start]...
Hi,
I have a union query, qry_offenders based upon tbl_offenders, and is written as follows:
SELECT 'Probation' AS ConditionDescription, Male, Female, [Probation Start] as [Start]
FROM tbl_Offenders WHERE Probation = True
UNION ALL SELECT 'Conditional Sentence', Male, Female, [CS Start] as...
Hi,
I have created a Union Query which selects data from my main table 'tbl_offenders'. This returns all data that is stored in the table according to the following fields:
SELECT 'Probation' AS ConditionDescription, Male, Female
FROM tbl_Offenders
WHERE [Probation] = True
UNION ALL SELECT...
Hi,
I have a date parameter placed on my query that is as follows:
Between [Forms]![frm_DateParameter]![cboStart] And [Forms]![frm_DateParameter]![cboEnd]
So, frm_DateParameter opens up, and the onclick event of the command button on the form populates the query.
The problem arises is that...
Hi,
I need to summarize a set of data and I can't quite figure out how to put this in a single query or report.
For example:
I wish to calculate the number of clients that would appear in each of the following fields, i.e. male on probation, male on conditions, females on fines, etc...
Hi everyone,
I have made a query which has two fields that I would like to put parameters on. These two fields are date fields which would allow users to check for records within a certain time frame. I have designed a form (frm_DateParameter) which the user can input these desired dates in...
Hi,
How would I go about calculating length of time in a query. For example. I have a table called tbl_main, with field 'Date of Birth". How would I be able to use a query to calculate how old a person is? Thanks for any help!
Hi,
Right now I am using a form with various pages. I have a command button which, when clicked, goes to the next page (page down). This is based on a macro. I would like to take the macro away and write the code in VB. Unfornately I am not sure how to do this. Anyone know a code for this...
Hi everyone,
How do I go about making controls visible/invisible based upon if a check box is checked or not?
e.g.
If check1 is checked then i want label 1 to be visible, if not checked, then i want label 2 to be visible. Can someone please help me on this? Thanks so much!
Hi everyone,
I have a data entry form on which I have placed a cmd button to clear all fields. However, when this happens, the blank fields are saved in my table to which the form is bound. My code is pretty basic and reads:
Private Sub Command109_Click()
Me.Last_Name = ""
Me.Given_Names = ""...
Hi,
Is it possible to put a password on a single control, so that only authorized persons can use the control?
For example, I have a command button, cmdEnter, which I want to put a password on, so when the password is entered correctly, another form, frmMain, will open.
Greg
Hi,
Could someone help me out with adding a command button (cmdClear) to a form that in the on click event it would clear all text boxes for that particular record? What would the coding be for this? Thanks for any help :)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.