473,625 Members | 3,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do I need to set form properties every time??

Hi, I'd like to change the properties of the default form design. Every
form I need to change many settings.
Especially the following properties (I try to translate them well from
Dutch):
* make the borderstyle dialog
* no recordlines
* no navigationbutto ns
* backgroundcolor white
* font change
* no scrollbars
* modal = yes
* no right-click menu
etc.etc.

How can I accomplish this? Any help would be great.

Nov 13 '05 #1
7 1665
create a new form, call it frmDefault
set the form properties
click on any control (you don't have to put it on the form) to display
its properties
change its properties

repeat for all controls you want to modify
save the form

under tools->options->forms / reports tab, set the form template to
'frmDefault'

Nov 13 '05 #2
Go to Tools|Options|F orms/Reports tab. You will see a textbox for "Form
template:". Type the name of an existing form that you want to use as a
template. This will only work for forms you create yourself, not for forms
created by using a wizard.

--
Wayne Morgan
MS Access MVP
<al********@it4 us.nl> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
Hi, I'd like to change the properties of the default form design. Every
form I need to change many settings.
Especially the following properties (I try to translate them well from
Dutch):
* make the borderstyle dialog
* no recordlines
* no navigationbutto ns
* backgroundcolor white
* font change
* no scrollbars
* modal = yes
* no right-click menu
etc.etc.

How can I accomplish this? Any help would be great.

Nov 13 '05 #3
Both the wizard, as the 'manual form creation', start over again with
recordlines, modal=no, right mouseclick enabled, etc.
No solution (yet)? Would it maybe be able to create a macro to make 10
or 20 settings in a click?

Nov 13 '05 #4
Ok, this is fine for copying a form. What I would like, is whenever I
start the wizard, it creates the form with the settings I consider to
be 'standard'.
So I'm not satisfied with the solution.
I'm working on A2k by the way.

Nov 13 '05 #5
I don't think the template will set all of the form's properties. Yes, in
that case I would create a macro that would accept the name of the form I
wanted to adjust and have it do that. The macro will need to open the form
in design mode and close it using the acSaveYes parameter.

Example:
Public Sub MyFormSetup(str FormName As String)
DoCmd.OpenForm strFormName, acDesign,,,,acH idden
'The hidden option is optional. If you don't use it, leave out the commas
preceding it also.
'Do your property changes here
'List one per line
Forms(strFormNa me).Modal = False
DoCmd.Close acForm, strFormName, acSaveYes
End Sub

--
Wayne Morgan
MS Access MVP
<al********@it4 us.nl> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
Both the wizard, as the 'manual form creation', start over again with
recordlines, modal=no, right mouseclick enabled, etc.
No solution (yet)? Would it maybe be able to create a macro to make 10
or 20 settings in a click?

Nov 13 '05 #6
This works fine! I created a form, with a pulldown based on:
SELECT [msysobjects].[Name]
FROM msysobjects
WHERE ((([msysobjects].[Type])=-32768));
and a button with caption "Design the form". Looks nice, works nice.

Now I'd like to improve it and set all desired properties in a table,
so I got better control over it than hard coded. I got two additional
questions:

All the properties I need to translate Dutch->English. I've been
digging on the web, but I can't find a simple list of Form properties.
In the help files it's all scattered information as well. Anyone knows
a good list?

If I want to set certain properties, I need to set a value. Can this
been done simpler?
What I mean is e.g.:
Forms(strFormNa me).BorderStyle = 3 ' this number is "dialogue"

Thanks for any help.

Nov 13 '05 #7
The closest thing I can think of to a list would be to open the code editor
and search help for "form object". The resulting page will have two headers
at the tope called Properties and Methods. These will list all of a form's
properties and methods.

Depending on where the code is, you may be able to use a built-in constant
instead of the number, if one has been defined. If one has been defined it
will be in the help article for that topic. This applies to functions as
well. The built-in constant will be recognized in VBA code, but not in a
query or as an equation in a calculated control. In your example, it could
be written:

Forms(strFormNa me).BorderStyle = acDialog

However, this constant comes from the DoCmd.OpenForm function call and it
just happens that the value is 3 here also. I don't see a constant for Thin
or Sizeable, but you could create your own. In a standard module, create a
Public Constant that you could use elsewhere in your code.

--
Wayne Morgan
MS Access MVP
<al********@it4 us.nl> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
This works fine! I created a form, with a pulldown based on:
SELECT [msysobjects].[Name]
FROM msysobjects
WHERE ((([msysobjects].[Type])=-32768));
and a button with caption "Design the form". Looks nice, works nice.

Now I'd like to improve it and set all desired properties in a table,
so I got better control over it than hard coded. I got two additional
questions:

All the properties I need to translate Dutch->English. I've been
digging on the web, but I can't find a simple list of Form properties.
In the help files it's all scattered information as well. Anyone knows
a good list?

If I want to set certain properties, I need to set a value. Can this
been done simpler?
What I mean is e.g.:
Forms(strFormNa me).BorderStyle = 3 ' this number is "dialogue"

Thanks for any help.

Nov 13 '05 #8

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

Similar topics

6
7860
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've allso subclassed the window and do see all kinds of WS_??? messages coming by. But now I'm stuck :-\ I've got *no* idea what to do next, and all my searching on the web leads me
1
281
by: Marcin Floryan | last post by:
Hello! My question regards opening (and re-opening) Form and the Load event. I have a main form (frmMain) and I also have a data form (frmData). In the main form I have created: Private fData as new frmData()
19
4087
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can easily understand a newbie using bound controls or someone with a tight deadline. I guess I need...
11
2793
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field (strPubCity) for Publisher City. These two fields have a many-to-one relationship with tables, (tlkpPubName and tlkpPubCity) respectively. The lookup tables only have one field (strPubName and strPubCity), which is their primary key. I also have...
6
2872
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox and the coresponding 'Id' from the lookup table is to be inserted into the field of the new record. I have two simple tables. "tblPerson" is the data table. The lookup
5
1361
by: AMP | last post by:
Hello, Form1 has a button that creates Form2 that has a button that changes a lable on Form1. How do I give(send) Form2 a reference to Form1? Thanks Mike
17
479
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get the value of a form control? ----------------------------------------------------------------------- In HTML documents, named forms may be referred to as named properties of the « document.forms » collection, and named form controls may be referred to as named properties of the form's elements collection: var frm = document.forms;
4
9845
by: FullBandwidth | last post by:
I have been perusing various blogs and MSDN pages discussing the use of event properties and the EventHandlerList class. I don't believe there's anything special about the EventHandlerList class in this context, in fact some articles from pre-2.0 suggest using any collection class of your choice. So my questions focus more on the syntax of event properties provided by the "event" keyword in C#. (Disclaimer - I am a C++ programmer working...
4
955
by: Lloyd Sheen | last post by:
This is VS 2008 acting like VS 2002. I open a form and it is marked as changed. Why would that happen? LS
0
8259
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8192
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,...
1
8358
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7188
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...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
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
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
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
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.