I managed to autopopulate a table from another table (Event Add page / on load), but it works not always.
My code:
[indent]Sub AddOnLoad()
'** Insert a record into another table ****
str = "select * from masterdata where H_Lizenz_AOA=" & Session("UserID")
Set rsTemp = server.CreateObject("ADODB.Recordset")
rsTemp.open str, dbConnection
Session("H_Kategorie_AOA") = rsTemp("H_Kategorie_AOA")
Session("H_Klasse_AOA") = rsTemp("H_Klasse_AOA")
Session("H_Name_AOA") = rsTemp("H_Name_AOA")
End Sub[/indent]
Problem: in 90% of cases when I click the add link the window opens but with empty fields. I click the refresh and fields are populated. What can I do to have it populated in 100% of cases?
Philip