I am trying to make a startup script which selects a predefined TAB page from a form at startup.
This is how i want it to be:
I have a table which contains user-data. In this i have a collum called "Startup tab" where the user can predefine which startup page he wants from the tab control. Short explained i want the code to do this job: Me.preffered_tab.setfocus on startup, and that the preffered tab should be looked up from a table
For this i use
Expand|Select|Wrap|Line Numbers
- DLookup("[Startup tab]", "main tbl brukere", "username='" & ntlogin & "'")
Expand|Select|Wrap|Line Numbers
- Dim ntlogin As String
- Dim su As ???
- Init_Globals
- ntlogin = Environ("Username")
- su = DLookup("[Startup fane]", "main tbl brukere", "Brukernavn='" & ntlogin & "'")
- [Form_MAIN Hovedmeny].su.SetFocus
I am pretty sure i need to Dim SU as something (it is dimmed as text in the table), but i dont know what.
Any suggestions?