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

Create Form Section

Can anyone help please

I have created a form using

Dim Frm as form

Set Frm = CreateForm()

This gives me a basic form with just the Detail section created.

Without using a template how can I add a Form Header & Footer.
It should be something like

Dim MySection as Section
Set MySection = CreateSection(Frm.Name, acheader, Height, Width)

but there does not appear to be anything like it in AK2

TIA

Phil
Nov 13 '05 #1
2 8215
Phil Stanton wrote:
Can anyone help please

I have created a form using

Dim Frm as form

Set Frm = CreateForm()

This gives me a basic form with just the Detail section created.

Without using a template how can I add a Form Header & Footer.
It should be something like

Dim MySection as Section
Set MySection = CreateSection(Frm.Name, acheader, Height, Width)

but there does not appear to be anything like it in AK2


nor in A97.

Sub SetFormHeader(F As Form, bSwitchOn As Boolean)
Dim S As Section
On Error Resume Next
Set S = F.Section(acHeader)
If bSwitchOn Then
'if error, add
If Err > 0 Then
RunCommand acCmdFormHdrFtr
End If
Else
'if no error, remove
If Err = 0 Then
RunCommand acCmdFormHdrFtr
End If
End If
End Sub
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #2
Works a charm

Thanks a lot

Phil
"Bas Cost Budde" <b.*********@heuvelqop.nl> wrote in message
news:cq**********@news2.solcon.nl...
Phil Stanton wrote:
Can anyone help please

I have created a form using

Dim Frm as form

Set Frm = CreateForm()

This gives me a basic form with just the Detail section created.

Without using a template how can I add a Form Header & Footer.
It should be something like

Dim MySection as Section
Set MySection = CreateSection(Frm.Name, acheader, Height, Width)

but there does not appear to be anything like it in AK2


nor in A97.

Sub SetFormHeader(F As Form, bSwitchOn As Boolean)
Dim S As Section
On Error Resume Next
Set S = F.Section(acHeader)
If bSwitchOn Then
'if error, add
If Err > 0 Then
RunCommand acCmdFormHdrFtr
End If
Else
'if no error, remove
If Err = 0 Then
RunCommand acCmdFormHdrFtr
End If
End If
End Sub
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea

Nov 13 '05 #3

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

Similar topics

2
by: Salad | last post by:
Is there a way to determine which section of a form a control is located in code....besides using the tag property?
5
by: Kevin Myers | last post by:
How can one obtain obtain the height of a MS Access 2K form? There is a width property, but I don't see a corresponding height property. I need to obtain the height of the form so that I can...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
10
by: robwharram | last post by:
Hi, I'm quite frustrated in the fact that I can't even display a simple "Hello World" message on .Net. I've been through all of the groups and searched all over the place and haven't been able...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
7
by: FNA access | last post by:
I have a mainform that has a subform in the detail section and a subform in the footer section.(Both subforms are in datasheet view) When I click the navigation button to create a new record on the...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
14
RMWChaos
by: RMWChaos | last post by:
Firebug is reporting "too much recursion" when I attempt to create a child element in a parent that doesn't exist yet. The script should automatically create the missing parent before going on to...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.