dbTalk Databases Forums  

How to chnage the property of the command button in a Detail section

comp.databases.ms-access comp.databases.ms-access


Discuss How to chnage the property of the command button in a Detail section in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Vinayak Shanbhag via AccessMonster.com
 
Posts: n/a

Default How to chnage the property of the command button in a Detail section - 01-07-2005 , 10:27 AM






Hi,
I have the following problem
------------------------------------

I am displaying the multiple records in MS Access Detail Section. Each row has Command Button called "Store". I need to enable or disable this button based on the status of the record that is avaibale in the field called "Status" in the same row. Ho do I do this
To summarize the above problem
Detail Section
===============
Row1 >> Field1 Field2 Field3 <Store> <Status>
Row2 >> Field1 Field2 Field3 <Store> <Status>
Row3 >> Field1 Field2 Field3 <Store> <Status>
Row4 >> Field1 Field2 Field3 <Store> <Status>

Based on the value in <Status> field, <Store> will be enabled/disabled.


Thanks in advance
Vin

--
Message posted via http://www.accessmonster.com

Reply With Quote
  #2  
Old   
Jerry Porter
 
Posts: n/a

Default Re: How to chnage the property of the command button in a Detail section - 01-07-2005 , 11:16 AM






Vin,

Since Store is only one control, it is either enabled or disabled (for
all records). You can call code or a macro in the On Current event to
enable/disable it when the user moves to each record. This will
correctly allow or prevent the user from using the button. But the
display will show the button being enabled/disabled for all records,
which isn't very clear.

Instead of a command button, you could use a control that can vary with
the data, like a text box or a command button. It would be tricky to
make these work the way you want.

Jerry


Reply With Quote
  #3  
Old   
Vinayak Shanbhag via AccessMonster.com
 
Posts: n/a

Default Re: How to chnage the property of the command button in a Detail section - 01-07-2005 , 12:41 PM



Thanks Jerry,
I have used this forum for the first time and I am surprised to see the quick responce. Thanks for the suggestion of using the current event. Though it is not exactly what i wanted , the solution is very near to that. Thanks again
-Vin

--
Message posted via http://www.accessmonster.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.