472,378 Members | 1,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,378 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 1612
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
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.