Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: gRegulator
  • Content: Threads
  • Order by date
  1. gRegulator

    Date Parameters in SQL Query

    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...
  2. gRegulator

    SQL Query, Wrong Results

    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...
  3. gRegulator

    Average Caseload between Dates

    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...
  4. gRegulator

    Query: Average Daily Counts per Month

    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...
  5. gRegulator

    Year End Summary Query: Average of Each Month

    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...
  6. gRegulator

    Error Message in SQL Query

    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]...
  7. gRegulator

    Change Column Headings in Crosstab Query

    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...
  8. gRegulator

    Calculating Age based on Date of Admission

    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...
  9. gRegulator

    Date Parameter on Crosstab Query

    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]...
  10. gRegulator

    SQL Query, Date Parameter troubles

    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...
  11. gRegulator

    SQL Union, Summary Query: Date Parameter

    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...
  12. gRegulator

    Date Parameter on Query: Include Dates

    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...
  13. gRegulator

    Calculate a series of fields in a query or report??

    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...
  14. gRegulator

    Parameter Form from Query

    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...
  15. gRegulator

    Calcluating Age in a query

    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!
  16. gRegulator

    Page Down Command button on a form

    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...
  17. gRegulator

    Visible controls from a check box

    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!
  18. gRegulator

    cmd button - Clear fields and don't save in table

    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 = ""...
  19. gRegulator

    Password on a single control

    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
  20. gRegulator

    Add cmdClear to Form

    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 :)

Part and Inventory Search

Back
Top