A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

enabling buttons...



 
 
Thread Tools Display Modes
  #1  
Old January 24th, 2010, 05:44 PM posted to microsoft.public.access.forms
thewabit via AccessMonster.com
external usenet poster
 
Posts: 54
Default enabling buttons...

Thanks for all good help you guys offer!

I have a listbox form that displays a list used for multiple reasons. I.E. it
lists templates and you can select them to be modified, to view a summary,
etc. This listbox is launched from other forms.
Question: Is there a way to have multiple buttons on this list box but only
enable certain ones depending on which form launched it?

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

  #2  
Old January 24th, 2010, 10:16 PM posted to microsoft.public.access.forms
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default enabling buttons...

Hi wabit,

I've never heard of having buttons on a list box, but you can certainly have
buttons on a form. Yes, these could be enabled depending on which form
launched it by using the optional OpenArgs parameter in the DoCmd.OpenForm
statements in each calling form. You would then use code in the form that is
opened, in the Form_Open event procedure, to inspect the value of the
OpenArgs statement if not null. You can use a Select Case....End Select
construct to conditionally enable/disable command buttons based on the
OpenArgs value.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"thewabit via AccessMonster.com" wrote:

Thanks for all good help you guys offer!

I have a listbox form that displays a list used for multiple reasons. I.E. it
lists templates and you can select them to be modified, to view a summary,
etc. This listbox is launched from other forms.
Question: Is there a way to have multiple buttons on this list box but only
enable certain ones depending on which form launched it?

  #3  
Old January 25th, 2010, 12:04 AM posted to microsoft.public.access.forms
thewabit via AccessMonster.com
external usenet poster
 
Posts: 54
Default enabling buttons...

Tom,

Thanks for the reply. I guess I should have stated that better. It is a form
with a listbox on it and buttons at the bottom to open other forms and
populate it with the data selected in the list box (or data the list box item
represents).

I have successfully used the openargs to do this however my delemma now is
the 1st form has buttons (which now I am learning aren't buttons) that have
been programmed to launch the 2nd form (the one with the listbox). Depending
on the item clicked on the first form determines which button on the 2nd form
will enable. So the point is...

Question 1...Do I send the form name AND the selectable item name (button) in
open args and how?

Question 2...How do I determine what the name of that selectable item is
because right now they are named "Label408, Label409, etc. I don't think
those are buttons.

Thanks!

Tom Wickerath wrote:
Hi wabit,

I've never heard of having buttons on a list box, but you can certainly have
buttons on a form. Yes, these could be enabled depending on which form
launched it by using the optional OpenArgs parameter in the DoCmd.OpenForm
statements in each calling form. You would then use code in the form that is
opened, in the Form_Open event procedure, to inspect the value of the
OpenArgs statement if not null. You can use a Select Case....End Select
construct to conditionally enable/disable command buttons based on the
OpenArgs value.

Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

Thanks for all good help you guys offer!

[quoted text clipped - 3 lines]
Question: Is there a way to have multiple buttons on this list box but only
enable certain ones depending on which form launched it?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201001/1

 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.