473,657 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access: Command button property

Sam
Trying to change the visible property on a command button (access97) based
on a record felid on the form.

The felid is a check box felid and I am trying to make the button disappear
with the check box s checked.

The commend button name is command36 and the check bx feild is named [Multi
User].

I have written the following code:
IIf Me![Multi User] = True, Me!Command36.Vi sible = -1, Me!Command36.Vi sible
= 0

The visible functions are working if I put them in the "form load" area of
the vbcode, but the code will not look at the value of the check box.

Any ideas?

Nov 12 '05 #1
2 7605
On Fri, 05 Sep 2003 06:37:53 GMT in comp.databases. ms-access, "Sam"
<sa********@hot mail.com> wrote:
Trying to change the visible property on a command button (access97) based
on a record felid on the form.

The felid is a check box felid and I am trying to make the button disappear
with the check box s checked.

The commend button name is command36 and the check bx feild is named [Multi
User].

I have written the following code:
IIf Me![Multi User] = True, Me!Command36.Vi sible = -1, Me!Command36.Vi sible
= 0

The visible functions are working if I put them in the "form load" area of
the vbcode, but the code will not look at the value of the check box.


You want the code in the AfterUpdate event of the checkbox, if the
checkbox is bound then in Form_Current too.

BTW, your code is a bit long winded for what you want to do and the
syntax is not correct and it's logic conflicts with your explaination
in your second paragraph:

Command36.Visib le = Not [Multi User].Value

--
A)bort, R)etry, I)nfluence with large hammer.

(replace sithlord with trevor for email)
Nov 12 '05 #2
Sam
Thanks trevor, the code positions need to be refined but over the result I
was looking for was acheived.

Thanks again

Sam
"Trevor Best" <bouncer@localh ost> wrote in message
news:vg******** *************** *********@4ax.c om...
On Fri, 05 Sep 2003 06:37:53 GMT in comp.databases. ms-access, "Sam"
<sa********@hot mail.com> wrote:
Trying to change the visible property on a command button (access97) basedon a record felid on the form.

The felid is a check box felid and I am trying to make the button disappearwith the check box s checked.

The commend button name is command36 and the check bx feild is named [MultiUser].

I have written the following code:
IIf Me![Multi User] = True, Me!Command36.Vi sible = -1, Me!Command36.Vi sible= 0

The visible functions are working if I put them in the "form load" area ofthe vbcode, but the code will not look at the value of the check box.


You want the code in the AfterUpdate event of the checkbox, if the
checkbox is bound then in Form_Current too.

BTW, your code is a bit long winded for what you want to do and the
syntax is not correct and it's logic conflicts with your explaination
in your second paragraph:

Command36.Visib le = Not [Multi User].Value

--
A)bort, R)etry, I)nfluence with large hammer.

(replace sithlord with trevor for email)

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2350
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Before we start with our sample app we need to view the security configuration files on the machine. You will find them under <drive>\WInNT\Microsoft.NET\FrameWork\<version>\Config Enterprise Level Security configuration file is :- enterprise.config Machine Level Security configuration file is :- security.config
6
7428
by: MLH | last post by:
I've followed the instructions found on Microsoft's site... http://support.microsoft.com/default.aspx?scid=kb;en-us;149119&Product=acc97 Here are those instructions... To play and record sounds, follow these steps: Create the following new table in Design view: Table: Messages ----------------------- Field Name: Message Data Type: OLE Object
6
2719
by: Michael Bulatovich | last post by:
I have a very simple db I use for keeping track of hours, tasks, projects, clients etc. It has a form that I use to enter data. Currently the form has a textbox for a field called "start time", another for a field called "end time" and a third for a field called "hours", among other controls. I now type in the approximate times in the first two textboxes, and mentally calculate and enter the difference or elapsed time in the third. I...
6
59259
by: deko | last post by:
I have a several forms that accept user input in a textbox and then take some action based on that input after a command button is clicked. Is it possible issue the command when the user presses Enter rather than clicking the command button? I've tried this, but for some reason it's not working: Private Sub txtFind_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call cmdFind_Click End Sub
49
14324
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
6
2561
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns errors. The machine is a new laptop Windows XP Pro SP2 The machine is up to date with respect to the dot net framework. Details: Dot Net Framework ver. 1.0.3705 is installed Dot Net Framework ver. 1.1.4322 is installed
5
2681
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all that's come before. To take an extreme example, suppose you have been writing Visual Basic applications for years now. If you're like many developers, you will have built up a substantial inventory of code in that time. And if you've been following...
13
3978
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate button "Unexpected Error":3251 operation is not supported for this type of object.The demo cd has two databases, one is called inventory and the other just has the tables for the design called inventory data. When you run inventory the database works...
2
19457
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
8407
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7347
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6175
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.