473,397 Members | 1,969 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,397 software developers and data experts.

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 navigationbuttons
* 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 1657
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|Forms/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********@it4us.nl> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.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 navigationbuttons
* 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(strFormName As String)
DoCmd.OpenForm strFormName, acDesign,,,,acHidden
'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(strFormName).Modal = False
DoCmd.Close acForm, strFormName, acSaveYes
End Sub

--
Wayne Morgan
MS Access MVP
<al********@it4us.nl> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.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(strFormName).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(strFormName).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********@it4us.nl> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.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(strFormName).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
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...
1
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...
19
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...
11
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...
6
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...
5
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
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get the value of a form control? -----------------------------------------------------------------------...
4
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...
4
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
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...

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.