Update field in form automaticly

  • Thread starter Thread starter hermie
  • Start date Start date
H

hermie

Hello I have an data entry form with a field called tasknumber. What I want
to do is that it automatics calculate the tasknumber. It would be something
like this:
find personsname and last tasknumber then new tasknumber = lasttasknumber +1
I think an IIf function should bring the solution but how to find the last
tasknumber ?

Hope I explained well my question

Is this possible?
 
I now created a subquery which shows the last tasknumbers for each persons
SS#
See SQL view
SELECT DISTINCT [tareas estudiantes].ss, Last([tareas estudiantes].tareanr)
AS LastOftareanr
FROM [students activo] INNER JOIN [tareas estudiantes] ON [students
activo].ss = [tareas estudiantes].ss
GROUP BY [tareas estudiantes].ss
ORDER BY Last([tareas estudiantes].tareanr);

In the form I created next expression in the taskfield( = tareanr)
IIf ( [esc001-tareas]![ss] =true, [esc-tarea last]![LastOftareanr] +1, )

Now I get error #name

Do I need to join the query with the lastoftareanr with the data entry form
query?

What is the solution to make it work or is it not possible at all?

Herman
 
Back
Top