Can DMIN return multiple values

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • turtle

    #1

    Can DMIN return multiple values

    I need to write an update query that will return the earliest date to a
    table based on the data of a different table.
    I have a labor table that looks like this

    TableLabor
    JobCode WorkORder Sequence Date Hrs LinkedField
    A B100 4000 3/1/04 5 AB1004000
    A B100 4000 2/1/04 8 AB1004000
    B A100 2000 3/3/04 10 BA1002000
    etc...

    In my other table i need to show for each instance of Jobcode,
    Workorder and sequence the earliest date.

    TableBaseline
    Jobcode Workorder Sequence Date LinkField
    A B100 4000 2/1/04 AB1004000

    Basically i need an update query to take the earliest date from
    TableLabor and input it into the Date field of the TableBaseline field.

    I created a query for each table with a linked field that contains
    JobCode, Workorder and Sequence (is that right?) so the link field
    would be AB1004000 and so on... I then used a query based on the
    TableBaseline table and used the following function to update my
    table...
    dmin("[date]","tablelabor", "[linkedfield]=[linkedfield]")
    But it doesnt work...HELP please

  • Salad

    #2
    Re: Can DMIN return multiple values

    turtle wrote:
    [color=blue]
    > I need to write an update query that will return the earliest date to a
    > table based on the data of a different table.
    > I have a labor table that looks like this
    >
    > TableLabor
    > JobCode WorkORder Sequence Date Hrs LinkedField
    > A B100 4000 3/1/04 5 AB1004000
    > A B100 4000 2/1/04 8 AB1004000
    > B A100 2000 3/3/04 10 BA1002000
    > etc...
    >
    > In my other table i need to show for each instance of Jobcode,
    > Workorder and sequence the earliest date.
    >
    > TableBaseline
    > Jobcode Workorder Sequence Date LinkField
    > A B100 4000 2/1/04 AB1004000
    >
    > Basically i need an update query to take the earliest date from
    > TableLabor and input it into the Date field of the TableBaseline field.
    >
    > I created a query for each table with a linked field that contains
    > JobCode, Workorder and Sequence (is that right?) so the link field
    > would be AB1004000 and so on... I then used a query based on the
    > TableBaseline table and used the following function to update my
    > table...
    > dmin("[date]","tablelabor", "[linkedfield]=[linkedfield]")
    > But it doesnt work...HELP please
    >[/color]

    Maybe use a totals query and get the Min of the date.

    Comment

    Working...