473,506 Members | 16,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting a toggle to open a form

2 New Member
When my Main Menu opens it opens another Form MiniMain
Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenForm "frmMiniMain"
End Sub

But I have a toggle switch on my Main Menu that I want to control whether it opens or not,this is the toggle settings, I need the script to make it work
Table: tblSetStableControlsSettings,
Field Name: MiniMain...............Turnip
Dec 18 '06 #1
3 1842
NeoPa
32,557 Recognized Expert Moderator MVP
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.     If UCase(DLookup("MiniMain","tblSetStableControlsSettings"))="TURNIP" Then _
  3.         DoCmd.OpenForm "frmMiniMain"
  4. End Sub
Dec 19 '06 #2
turniporange
2 New Member
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.     If UCase(DLookup("MiniMain","tblSetStableControlsSettings"))="TURNIP" Then _
  3.         DoCmd.OpenForm "frmMiniMain"
  4. End Sub
Thanks Neo, just changed Turnip for -1 :)
Worked Great Thanks
Dec 19 '06 #3
NeoPa
32,557 Recognized Expert Moderator MVP
Thanks Neo, just changed Turnip for -1 :)
Worked Great Thanks
Pleasure.
However, if it is compared to -1 then you're better of simply saying :
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.     If DLookup("MiniMain","tblSetStableControlsSettings") Then _
  3.         DoCmd.OpenForm "frmMiniMain"
  4. End Sub
Dec 19 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2277
by: Aravind | last post by:
Hi folks. I have a form, frmHistory, which has 3 toggle buttons (1 of which is tglName, which I will be using to demonstrate my problem). The buttons are used to sort the form (explanations...
4
4002
by: Alan Carpenter | last post by:
I'm not a Newbie but I feel like one right now. Here's what I did to reproduce a simple, simple problem. 1. Create a new Database. 2. Create a new Form. 3. Create a CheckBox on the form....
11
4785
by: MLH | last post by:
Why is that? If I choose the tiny check boxes which are hard to hit with a mouse, it works fine. But option buttions, shich can be sized big enough for people with limited sight and dexterity...
2
16428
by: Dave White | last post by:
Hello everyone, When I open this Form it displays all the records I then use a command button to apply a filter to these records. I would like to change the command buttom to a toggle switch...
4
4334
by: Neil Coleclough | last post by:
I am constructing a database to process product returns for my Company. I have a number of toggle buttons to identify the stage to which each return has been processed. For example, clicking the...
3
1608
by: Dica | last post by:
i want to set up my aspx page with a hierarchical navigation system. first the user has to select to "-- Select An Action --", which could be either "Add Item" or "Edit Item". If the user selects...
1
4417
by: Jeffrey Christiansen | last post by:
I wanted to add a toggle button to a VB2005 form to be used for a simple Windows Application (i.e. compiled to a "*.exe"), so I added the ActiveX Microsoft Forms Object toggle button, however I...
0
1992
by: ARC | last post by:
Hello all, In access 2007, it appears you cannot put a toggle button underneath a menu id and have it show a Pressed / Not Pressed status. If you make the toggleButton ID as part of the main...
1
2980
by: student4lifer | last post by:
Hello, I currently have a hyperlink to toggle the node, showing and hiding the list. Could someone show me how to use a checkbox instead of the hyperlink to do the same thing? Thanks. I...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
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...
0
7478
tracyyun
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...
0
5614
agi2029
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,...
1
5035
isladogs
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...
0
4701
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...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.