473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.Visible = -1, Me!Command36.Visible
= 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 7589
On Fri, 05 Sep 2003 06:37:53 GMT in comp.databases.ms-access, "Sam"
<sa********@hotmail.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.Visible = -1, Me!Command36.Visible
= 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.Visible = 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@localhost> wrote in message
news:vg********************************@4ax.com...
On Fri, 05 Sep 2003 06:37:53 GMT in comp.databases.ms-access, "Sam"
<sa********@hotmail.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.Visible = -1, Me!Command36.Visible= 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.Visible = 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
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 ...
6
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...
6
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",...
6
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...
49
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...
6
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...
5
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...
13
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...
2
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...

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.