am****@gmx.de (amir) wrote in message news:<c4**************************@posting.google. com>...
Hallo liebe Gemeinde,
ich möchte aus einem Formular aus, eine bereits vorhandene
Laufendenummer aus einer Tabelle.spalte auslese und dazu noch eine 1
addiere und dann das Ergebnis in ein Textfeld dieses Formulars
schreiben! Danach werden weitere Daten von dem User eingegeben und
dann werden alle diese Daten (die neue Laufendenummer auch) in der
gleichen Tabelle als neuer Datensatz gespeichert.
Ich denke an:
SELECT Max([laufendenummer])+1 AS nummer FROM tabelle;
Wie kann ich das Ergebnis dieses Statments in einem Formular und
Textfeld umleiten?
Noch weitere Vorschläge?
PS: Es handelt sich dabei nicht um eine Primärschlüssel!
From <John Knapp> (email):
Hi dear community:
from a form I want to pick an already existing running number from a
table.column and add to this 1, and then write the result into a text
field of this form. After this more data is entered by the user and
then all these data (the new running number, too) will be saved as
new data set in the same table. I thought of SELECT Max (running
number) + 1 AS number FROM table. How can I route the result of this
statement in a form and a text field. Any more suggestions? These
are no primary keys!
Manuela (the translator)
I believe I guessed what the basic question was correctly the last
time:
txtRunning.Value = DMax("[laufendenummer]","[tabelle]","[laufendenummer]
IS NOT NULL")+1
in VBA code when you load the Form. Then you need to put it in a
location that runs after you do the Save. Isn't that what you are
trying to do? Is your Form bound to this Field? Perhaps someone else
can see why you're having problems.
James A. Fortune