473,396 Members | 2,151 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,396 software developers and data experts.

changing controls specialeffect at runtime

553 512MB
Hi

I used this code to change the special effect of the controls.
After this, the form is saved.

Expand|Select|Wrap|Line Numbers
  1.     Dim ctl As Control
  2.  
  3.     For Each ctl In Me.Controls
  4.         If TypeOf ctl Is ComboBox Then
  5.            ctl.SpecialEffect = 0
  6.            ctl.BorderColor = RGB(255, 128, 140)
  7.         End If
  8.      Next ctl
  9.  
  10.      DoCmd.Save acForm, "Form1"
  11.  

When i close the form and re-open it ,all the changes are not there.

Why does it do that when i save the form as well from code itself ?

Thanks
Qi
Oct 12 '07 #1
4 2073
nico5038
3,080 Expert 2GB
Change

DoCmd.Save acForm, "Form1"

into

DoCmd.Close acForm, "Form1", acSaveYes

And tell me the result. Make sure that the form is open in edit mode when running the code !

Nic;o)
Oct 12 '07 #2
missinglinq
3,532 Expert 2GB
The DoCmd.Close acForm, "Form1", acSaveYes

part is correct, but I think the changes have to be made while the form is in Design View, not while the it's being used in the normal fashion.

Linq ;0)>
Oct 12 '07 #3
nico5038
3,080 Expert 2GB
Well detected hawkeye Linq. Should have used "Design View" instead of "edit mode" <LOL>

Nic;o)
Oct 12 '07 #4
missinglinq
3,532 Expert 2GB
I figured that was what you meant!

;0)>

BTW, did you once upon a time belong to those mercenary guys over at Experts-Exchange (knowledge for money)?
Oct 12 '07 #5

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

Similar topics

2
by: Aaron Queenan | last post by:
Is there any way to change the name of a tab at runtime (after the dialogue has been displayed)? Alternately, is there any way to add and remove tab without causing the screen to flicker? ...
2
by: ilPostino | last post by:
ok, so I have my asp.net application. I want a single page which can load asp user controls and at runtime. How can this be done? I don't want to drag the control onto the page because then I...
1
by: Tobe | last post by:
We want to change the autopostback properties (serverside) of all of the dropdownlistboxes on the page. I am trying to loop through the Request.Form.Items, but I can't seem to get more the the...
4
by: Chuck Ritzke | last post by:
Hi, I've searched the newsgroup and other sources to understand how to handle runtime controls and see I'm not the only one who's confused, but I'm still not quite sure of the best way to handle...
6
by: nbeaubien | last post by:
I would like to know the way to determine witch controls are selected in a multi-selection on a form in design mode with VBA.
3
by: phonl | last post by:
I am a vb6 ADO developer looking at vb.net 2005 and ADO2.net. I used the vb.net 2005 data wizard to bind some controls to a database. Now I want to run a select query and have the bound controls...
2
by: tfsimes | last post by:
Hi, I am a long time ASP developer learning .NET, so please bear with me. I am trying to find an article or such that will help me understand how to change control properties at runtime based on...
8
Megalog
by: Megalog | last post by:
Hey guys.. my turn to ask a question: I'm having a weird issue with a form I've reworked. This form has a combo box, which when used is changing the recordsource of a subform. This subform has...
0
by: zufie | last post by:
I have a main form containing 2 checkboxes, ChckIBCCP and ChckOtherReferral The respective checkboxes when checked cause the SpecialEffect Property to make ALL the textboxes to appear Shadowed....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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...
0
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,...
0
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...

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.