Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Question Unanswered: changing values in a query

    I have a chart on a form that is run by a query: "ChartQuery"
    the select statement is as follows:

    SELECT Input.[In], Targets.TargetIn, Metrics.AccMeasure, Metrics.ExeMeasure, Input.Date
    FROM Job INNER JOIN (Employee INNER JOIN ([Input] INNER JOIN (Targets INNER JOIN Metrics ON Targets.Measure = Metrics.Measure) ON Input.Measure = Metrics.Measure) ON (Employee.EmpNo = Input.EmpNo) AND (Employee.EmpName = Targets.EmpName)) ON (Job.JobNo = Targets.JobNo) AND (Job.JobNo = Metrics.JobNo) AND (Job.JobNo = Input.JobNo)
    WHERE (((Input.Measure)="Absenteeism (shift)") AND ((Input.EmpNo)=5) AND ((Input.JobNo)=2));

    its long, i know, but it works
    towards the end of the query where you see:
    ((Input.Measure)="Absenteeism (shift)")

    Firstly, i want "Absenteeism (shift)" to be a value read from a combo box.

    Secondly, after update of the combobox that value must change and hence the chart must change too.

    how would i go about doing this?
    any help will be greatly appreciated.

    thanks in advance
    actionant

  2. #2
    Join Date
    Jun 2003
    Location
    Belgium
    Posts
    133

    Re: changing values in a query

    Replace "Absenteeism (shift)" in your SQL with the following line :

    Forms!FormName!Comboname

    Don't use the " and put the name of your form and the combobox in the right place.
    Every time you update the combobox, your chart should be updated too.

  3. #3
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: changing values in a query

    Originally posted by Herman
    Replace "Absenteeism (shift)" in your SQL with the following line :

    Forms!FormName!Comboname

    Don't use the " and put the name of your form and the combobox in the right place.
    Every time you update the combobox, your chart should be updated too.
    oh man you've been a great help
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •