473,799 Members | 3,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Anyway to change the "style" of an existing form??

Hello:

The group has new 'standards' for online forms and I need to change the
'style' of my existing forms (A2002). Can I do this? I can't find a
way using the GUI or the properties.

Thanks,
Richard H

Nov 12 '05 #1
1 2417
Richard Holliingsworth wrote:
Hello:

The group has new 'standards' for online forms and I need to change the
'style' of my existing forms (A2002). Can I do this? I can't find a
way using the GUI or the properties.

Thanks,
Richard H

Nope. I wrote small routines to change this or that property in all
forms I have.

Paste this in some module:

Sub EnumDatabase(cC ollection As String, cAction As String, Optional
nMode = enumActionOpenR ead)
'cCollection bevat Forms, of Tables, enz
'cAction is een functienaam MET HAAKJE OPENEN, en eventueel constante
argumenten (voorbeeld: execDFP)
' Elk document uit de collectie wordt naar deze functie gestuurd als
laatste argument
Dim db As Database
Dim ctr As Container
Dim doc As Document
Dim docmode As Long
On Error GoTo err_EnumDatabas e
Set db = CurrentDb
Set ctr = db.Containers(c Collection)
For Each doc In ctr.Documents
' "optioneel" openen
Select Case nMode
Case enumActionNothi ng
Case enumActionOpenR ead, enumActionOpenW rite
docmode = acDesign
Case enumActionView
docmode = acNormal
End Select
If nMode > enumActionNothi ng Then
Select Case cCollection
Case "forms"
DoCmd.OpenForm doc.Name, docmode
Case "reports"
DoCmd.OpenRepor t doc.Name, docmode
Case "tables"
DoCmd.OpenTable doc.Name, docmode
Case "modules"
DoCmd.OpenModul e doc.Name, docmode
End Select
End If
'werkpaard:
Eval cAction & Quote & doc.Name & Quote & ")"
' "optioneel" sluiten
Select Case nMode
Case enumActionNothi ng
Case enumActionOpenR ead, enumActionView
docmode = acSaveNo
Case enumActionOpenW rite
docmode = acSaveYes
End Select
If nMode > enumActionNothi ng Then
Select Case cCollection
Case "forms"
DoCmd.Close acForm, doc.Name, docmode
Case "reports"
DoCmd.Close acReport, doc.Name, docmode
Case "tables"
DoCmd.Close acTable, doc.Name, docmode
Case "modules"
DoCmd.Close acModule, doc.Name, docmode
End Select
End If
Next
exit_EnumDataba se:
Set ctr = Nothing
Set db = Nothing
Exit Sub
err_EnumDatabas e:
Select Case Err
Case Else
Debug.Print cAction & doc.Name & ")"
Debug.Print Err.number; Err.Description
Resume Next
End Select
End Sub
'een aantal implementaties met EnumDatabase

Sub DoFormPatch(cCo ntrol As String, cProperty As String, cNewValue As
String)
Dim action As String
action = "execDFP("
action = action & Quote & cControl & Quote & ","
action = action & Quote & cProperty & Quote & ","
action = action & Quote & cNewValue & Quote & ","
EnumDatabase "forms", action, enumActionOpenW rite
End Sub

Function execDFP(cContro l As String, cProperty As String, cNewValue As
String, cForm As String) As Boolean
On Error Resume Next
Forms(cForm).Co ntrols(cControl ).Properties(cP roperty).Value = cNewValue
End Function

You can now call for instance

DoFormPatch "txtUser","back ground","32768"

from the debug window.

And, you can use EnumDatabase for many more purposes. See if you can
follow it, mail me if you need english comments (I have no time for that
now).
--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #2

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

Similar topics

3
1576
by: Sara Khalatbari | last post by:
Hi! Suppose you're writing a module & writing the definition of each function in that module in " or """. for example: a) "This function does this & that" or: b) """This function does blah blah blah"""
4
10742
by: John MacIntyre | last post by:
Hi, Using the script below, when you click on the radio button beside click here .... the first row shrinks. Has anybody else ever experienced this? Does anybody know of a logical explaination for this? A co-worker told me it is not valid HTML. He may be right, but we both agree; it's odd that IE would handle it when the form is loaded, but not
13
40770
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
1
3320
by: Ahmad Noori | last post by:
I have a form and in the form, I have a drop down box. Based on what the user selects, i want to display different input boxes. Here is my drop down box: <td> <select name="reptype" onchange="checkVersion4()"> <option value=""></option> <option value="A">A:</option> <option value="B">B:</option> <option value="C">C:</option>
5
17713
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a fancy style, but the onclick fails to do anything no matter what permutation of parameters I try. <input type=button style=background-color:yellow;color:blue;font-family:Arial;font-style:italic;font-weight:bold name="xyz" value="CHANGE COLOUR"...
0
1213
by: André | last post by:
I'm trying to change an app so that it uses gettext for translations rather than the idiosyncratic way I am using. I've tried the example on the wxPython wiki http://wiki.wxpython.org/index.cgi/RecipesI18n but found that the accented letters would not display properly. I have found a workaround that works from Python in a Nutshell; however it is said in that book that "...this is not good style". I would like to do things "in good...
5
5486
by: Tobin Fricke | last post by:
In posting to a blog, I would like to bold every list item (<li>). Because I cannot influence the <head>...</head> section of the HTML document, I can neither add a <style>...</style> block, nor reference an external style sheet. Is there a way to accomplish this using the "style" attribute and/or using div or span tags? I want to do something like this: <!-- desired application of css !--> <div style="li {font-weight: bold;}">
6
29319
chunk1978
by: chunk1978 | last post by:
hi there... i'm about to embark on my very first PHP code journey (i've been saying that for a while... so sometime soon i hope... anyway)... before i begin my exciting new journey into PHP land, i would like to know if PHP will send hidden HTML form elements or not?... for example: if a user makes a selection in my HTML form that triggers my wonderfully dynamic HTML to set a DIV to STYLE="DISPLAY:NONE", is it possible to tell PHP not...
0
2651
by: =?Utf-8?B?QXR1bA==?= | last post by:
When .Net 1.0 webservice (VS2003) generates a wsdl - <wsdl:binding name="TestSoap" type="tns:TestSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/(note: style attribute present) <wsdl:operation name="HelloWorld"> <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" /> But when .Net 2.0 webservice (VS2005) generates a wsdl -
0
9538
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
10470
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
9067
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
7561
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
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2935
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.