Mittelwert aus anderer Query in Textfeld funktioniert nicht Access 2010
Liebe Gemeinde,
ich bräuchte wieder mal eure Hilfe:
ein Textfeld auf einem Formular zeigt mir die Anzahl der Mitarbeiter an, nun möchte ich noch den Mittelwert aus einer anderen Query in ein weiteres Textfeld einbauen, das klappt aber einfach nicht..
Textfeld 1: =Anzahl([Mitarbeiter])
Textfeld 2: =Mittelwert([qry_mittelwert120_150]![Stunden]) - verwende ich dieses Textfeld funktioniert das Textfeld 1 auch nicht mehr (#Fehler)
Was mache ich da falsch?
Ich kann leider die beiden Datensätze nicht in eine Query packen da ansonsten die Mitarbeiter doppelt vorhanden sind.
Danke!
Gruß
Dr.
ich bräuchte wieder mal eure Hilfe:
ein Textfeld auf einem Formular zeigt mir die Anzahl der Mitarbeiter an, nun möchte ich noch den Mittelwert aus einer anderen Query in ein weiteres Textfeld einbauen, das klappt aber einfach nicht..
Textfeld 1: =Anzahl([Mitarbeiter])
Textfeld 2: =Mittelwert([qry_mittelwert120_150]![Stunden]) - verwende ich dieses Textfeld funktioniert das Textfeld 1 auch nicht mehr (#Fehler)
Was mache ich da falsch?
Ich kann leider die beiden Datensätze nicht in eine Query packen da ansonsten die Mitarbeiter doppelt vorhanden sind.
Danke!
Gruß
Dr.
Please also mark the comments that contributed to the solution of the article
Content-Key: 311844
Url: https://administrator.de/contentid/311844
Printed on: April 24, 2024 at 03:04 o'clock
3 Comments
Latest comment
With VBA, this is done with
I think the AVG() Function does not work because the query is not executed in this context.
Regards
TextField2.Value = DAvg("Stunden", "qry_mittelwert120_150")
Regards
Zitat von @Dr.Cornwallis:
My Textfield looks like this:
As Result i get a "#Name", do u know why?
Because this parameters have to be strings not objects ;-PMy Textfield looks like this:
=DomAnzahl([Mitarbeiter];[qry_cluster150])
As Result i get a "#Name", do u know why?
=DomAnzahl("Mitarbeiter";"qry_cluster150")