Hello!
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_ta b.setfocus on startup, and that the preffered tab should be looked up from a table
For this i use - DLookup("[Startup tab]", "main tbl brukere", "username='" & ntlogin & "'")
Then, on the form_load event i tried to place this code - 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
But this gives me the errorcode of "Method or datamember not found".
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?
3 1568
Hello!
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_ta b.setfocus on startup, and that the preffered tab should be looked up from a table
For this i use - DLookup("[Startup tab]", "main tbl brukere", "username='" & ntlogin & "'")
o
Then, on the form_load event i tried to place this code - 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
But this gives me the errorcode of "Method or datamember not found".
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?
You have to set the value of the tab control itself.
Me.TabCtl0.Valu e = 2
or
Forms.Form1.Tab Ctl0.Value = 2
Where 2 is th Tab Index set up in the tab's control properties.
J
Thank you!
I made a table (Main Tab name) which contains the tab.name and tab.nr and i ended up with this code -
Private Sub Form_Load()
-
-
Init_Globals
-
ntlogin = Environ("Username")
-
-
Value_preffered_tab = DLookup("[preffered tab]", "Main tbl users", "username='" & ntlogin & "'")
-
tab_nr = DLookup("tabnr", "Main tab name", "Tab name ='" & Value_preffered_tab & "'")
-
-
Me.tabctl.Value = tab_nr
-
-
End Sub
-
ADezii 8,834
Recognized Expert Expert
Hello!
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_ta b.setfocus on startup, and that the preffered tab should be looked up from a table
For this i use - DLookup("[Startup tab]", "main tbl brukere", "username='" & ntlogin & "'")
Then, on the form_load event i tried to place this code - 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
But this gives me the errorcode of "Method or datamember not found".
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?
- Typically, su would be Declared as a Variant.
- When you get a chance, take a look at this Link.
Accessing Tabs on a Tab Control Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Duane Winner |
last post by:
Hello all -
I'm having a small problem with the mysql startup script that ships with
MySQL-3.23.56-1.
I'm running on RedHat Linux.
It works fine, but I have a backup server that runs a script that passes
these commands remotely through ssh:
(1) ssh dbsys-dc "sudo /etc/init.d/mysql stop" (2) ssh dbsys-dc "sudo tar
|
by: John |
last post by:
Hi,
I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine.
After reading the security section of the manual from
http://dev.mysql.com, I added passwords for the 'root' accounts.
However, now the startup script (/etc/rc.d/init.d/mysqld) fails.
I tried adding:
|
by: Harry Smith |
last post by:
While reading the documentation on IsStartupScriptRegistered, there is a
reference to "client startup script" as "Determines if the client startup
script is registered with the Page object."
What is meant by "Client Start Script"?
Thanks,
Harry
|
by: bill yeager |
last post by:
I'm registering a startup script in my "page load" event.
Everything works fine when I run it locally, but when it's
deployed to the webserver, it doesn't execute the
javascript which is inside a ".js" file (on the root
directory of the website).
Here is the HTML where I have the javascript function to
execute:
<code>
<TD style="HEIGHT:...
|
by: Sim Zacks |
last post by:
I reconfigured the redhat startup script for postgresql to work with
version 8 and that is working fine.
I thought I could put autovacuum in the startup script and that didn't
cause any problems, but it didn't turn on and I had to start it
manually.
Does anyone know why it didn't catch? I was watching the bootup and it
seemed that the...
| |
by: Larry |
last post by:
I have a Perl script using DBD::DB2, that runs during system startup on
a Solaris system. The script is working fine during startup on many
machines, except on one machine it fails complaining about a missing
".so" file, with Perl flagging the "use DBD::DB2" line. (I don't have
the exact message since I'm heard about it from a remote...
|
by: Dhanashree |
last post by:
I have a RangeValidator which uses AJAX to call server-side validation
function from the client. The code works fine, but I have one problem.
following is my range validator class:
public class RangeValidator: BaseValidator,ICallbackEventHandler
{
public event ServerValidateEventHandler ServerValidate;
String _controlToValidateValue;
|
by: traceable1 |
last post by:
Is there a way I can set up a SQL script to run when the instance
starts up?
SQL Server 2005 SP2
thanks!
|
by: mukeshrasm |
last post by:
hello friends
I am new to javascript and I have a problem. I am giving the code
<!-- Paste this code into the CSS section of your HTML document -->
<html>
<head>
<style type="text/css">
.menu {
position:relative;
background-color:gold;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |