473,396 Members | 1,706 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.

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 2370
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(cCollection As String, cAction As String, Optional
nMode = enumActionOpenRead)
'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_EnumDatabase
Set db = CurrentDb
Set ctr = db.Containers(cCollection)
For Each doc In ctr.Documents
' "optioneel" openen
Select Case nMode
Case enumActionNothing
Case enumActionOpenRead, enumActionOpenWrite
docmode = acDesign
Case enumActionView
docmode = acNormal
End Select
If nMode > enumActionNothing Then
Select Case cCollection
Case "forms"
DoCmd.OpenForm doc.Name, docmode
Case "reports"
DoCmd.OpenReport doc.Name, docmode
Case "tables"
DoCmd.OpenTable doc.Name, docmode
Case "modules"
DoCmd.OpenModule doc.Name, docmode
End Select
End If
'werkpaard:
Eval cAction & Quote & doc.Name & Quote & ")"
' "optioneel" sluiten
Select Case nMode
Case enumActionNothing
Case enumActionOpenRead, enumActionView
docmode = acSaveNo
Case enumActionOpenWrite
docmode = acSaveYes
End Select
If nMode > enumActionNothing 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_EnumDatabase:
Set ctr = Nothing
Set db = Nothing
Exit Sub
err_EnumDatabase:
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(cControl 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, enumActionOpenWrite
End Sub

Function execDFP(cControl As String, cProperty As String, cNewValue As
String, cForm As String) As Boolean
On Error Resume Next
Forms(cForm).Controls(cControl).Properties(cProper ty).Value = cNewValue
End Function

You can now call for instance

DoFormPatch "txtUser","background","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
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...
4
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...
13
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...
1
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"...
5
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...
0
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...
5
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...
6
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...
0
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:...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
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,...

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.