By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,490 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,490 IT Pros & Developers. It's quick & easy.

Do I need to set form properties every time??

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.