Neuigkeiten:

Ist euer Problem gelöst, dann bitte den Knopf "Thema gelöst" drücken!

Mobiles Hauptmenü

Vokabeltrainer

Begonnen von no-name-achim, Dezember 25, 2011, 02:33:14

⏪ vorheriges - nächstes ⏩

no-name-achim

Guten Abend zusammen,

und danke für eure Antworten :-)

Als, ich verstehe im Prinzip mehr oder weniger in der vorgegebenen Form, was der Code bedeutet. Ich selbst würde ich aber nie auf so eine Idee kommen. Die Programmcodes sind mir irgendwie nicht einleuchtend. Ich bin verwundert, wie so ein Code funktioniert, denn ich kann das beschriebene Ereignis nicht nachvollziehen. Die Parameter oder wie die heißen, sind einfach mit Kommas voneinander getrennt und wie versteht das der PC? Es tut mir schrecklich Leid, ich kenne mich soweiso nicht aus und wage vielleicht solch blöde Argumente :-( Ich beispielsweise würde so ein Code versuchen:

While
"antworttext" from tblAntworten = & lngFrage
and & lngFrage = "FragenID_FK"
do ...
else ...

So etwas in der Richtung könnte ich verstehen. Ich habe mich lange mit Programmiersprachen leider ohne Erfolg beschäftigt :-(((. In der Vergangenheit habe ich etwa 1 Jahr lang immer wieder versucht, aber im Endeffekt aufgegeben. Vielleicht liegts dran, warum ich nicht verstehe....
???
Grüße
achim


database

Hallo,

ZitatDie Parameter oder wie die heißen, sind einfach mit Kommas voneinander getrennt und wie versteht das der PC?
die DLookup-Funktion ist eine vorgefertigte Funktion, der lediglich die benötigten Parameter wie Feldname und Tabellenname sowie eine 'WHERE_Klausel' zur Einschränkung übergeben werden muss.
Dabei ist vorgeschrieben, dass die Parameter durch Beistrich getrennt angegeben werden müssen.

Das - sorry - etwas seltsame Codefragment deiner Phantasie stellt bei viel gutem Willen eine Art von While - Schleife dar.  :o
Mit der kannst du zwar auch einen Vergleich anstellen allerdings ist das .....  zzzzz vergiß es,
Schleifen dienen dazu bestimmte Codezeilen immer wieder auszuführen, bis die Bedingung im Kopf oder im Fuß der Schleife erfüllt ist


while i < 6
 i = i + 1
wend


Do While i < 6

   MsgBox "immer noch zu klein"
   i = i +1

Loop



Hast du schon die OH in Bezug auf Domänenaggregate und DLookup befraget?


no-name-achim

Hallo Peter,

jetzt versteh langsam, warum ich nicht verstehe :-)
Diese Schleife ist also eine vorgefertigte Form! In der vorgeschriebenen Reihenfolge werden die Daten vom PC verarbeitet...
Es hat mich nämlich gewundert, woher der PC wissen soll, wo die Tabelle ist oder das Tabellenfeld etc...
Mein fiktiver Code war nur ein Beispiel, um mich lediglich verständlich zu machen :-D

You can use the DLookup function to display the value of a field that isn't in the record source for your form or report. For example, suppose you have a form based on an Order Details table. The form displays the OrderID, ProductID, UnitPrice, Quantity, and Discount fields. However, the ProductName field is in another table, the Products table. You could use the DLookup function in a calculated control to display the ProductName on the same form.
The DLookup function returns a single field value based on the information specified in criteria. Although criteria is an optional argument, if you don't supply a value for criteria, the DLookup function returns a random value in the domain.

If no record satisfies criteria or if domain contains no records, the DLookup function returns a Null.

If more than one field meets criteria, the DLookup function returns the first occurrence. You should specify criteria that will ensure that the field value returned by the DLookup function is unique. You may want to use a primary key value for your criteria, such as [EmployeeID] in the following example, to ensure that the DLookup function returns a unique value:

Dim varX As Variant
varX = DLookup("[LastName]", "Employees", "[EmployeeID] = 1")

Whether you use the DLookup function in a macro or module, a query expression, or a calculated control, you must construct the criteria argument carefully to ensure that it will be evaluated correctly.

You can use the DLookup function to specify criteria in the Criteria row of a query, within a calculated field expression in a query, or in the Update To row in an update query.

You can also use the DLookup function in an expression in a calculated control on a form or report if the field that you need to display isn't in the record source on which your form or report is based. For example, suppose you have an Order Details form based on an Order Details table with a text box called ProductID that displays the ProductID field. To look up ProductName from a Products table based on the value in the text box, you could create another text box and set its ControlSource property to the following expression:

=DLookup("[ProductName]", "Products", "[ProductID] =" _
     & Forms![Order Details]!ProductID)


Und mir ist noch was aufgefallen:
lngFrage = Me!FragenID
    strAntwort = Me.txtAntwort
Was macht das Ausrufezeichen nach "me!" aus?

Ich hoffe, ich nerve dich nicht :-)))
Grüße

Beaker s.a.

Hallo Achim,

ZitatWas macht das Ausrufezeichen nach "me!" aus?

Schaust Du hier:
http://www.donkarl.com?FAQ6.3

hth
gruss ekkehard
Alles, was geschieht, geschieht. - Alles, was während seines Geschehens etwas anderes geschehen lässt, lässt etwas anderes geschehen. - Alles, was sich selbst im Zuge seines Geschehens erneut geschehen lässt, geschieht erneut. - Allerdings tut es das nicht unbedingt in chronologischer Reihenfolge.
(Douglas Adams, Mostly Harmless)