G
Guest
hi,
I'm making a dbase in which the following statement works:
Selection = "INSERT INTO Temp (Potnr,LotID) SELECT Max(Pot.Potnr) AS
MaxOfPotnr, Pot.LotID FROM Pot GROUP BY Pot.LotID HAVING (((Pot.LotID) = " &
Lotnummer & ")) ORDER BY Max(Pot.Potnr)"
DoCmd.SetWarnings False
DoCmd.RunSQL Selection
DoCmd.SetWarnings True
it shoots the max value of a Potnr (the number of a container) to the table
temp. But i would like to shoot the value of Potnr not to a table, but to a
variable, so i can use it to calculate with
any suggestions?
I'm making a dbase in which the following statement works:
Selection = "INSERT INTO Temp (Potnr,LotID) SELECT Max(Pot.Potnr) AS
MaxOfPotnr, Pot.LotID FROM Pot GROUP BY Pot.LotID HAVING (((Pot.LotID) = " &
Lotnummer & ")) ORDER BY Max(Pot.Potnr)"
DoCmd.SetWarnings False
DoCmd.RunSQL Selection
DoCmd.SetWarnings True
it shoots the max value of a Potnr (the number of a container) to the table
temp. But i would like to shoot the value of Potnr not to a table, but to a
variable, so i can use it to calculate with
any suggestions?