Continous Form - Additions = Yes or No

T

Tom

I have a Continous Form... when opened from a Switchboard, I want to be able
to add new records and also show the Navigation buttons.

However, there is also an instance where I call the Continuos Form from
another form (the record of "AnotherForm" matches then record of
"ContinousForm").

In this instance, I don't want to allow a) Additions and b) view the
Navigation buttons.

Does anyone know what lines of VBA code I need to write to set the property
settings to FALSE for both "No Additions" & "No Navigation Buttons)?


Thanks,
Tom
 
S

Sandra Daigle

In the continuous form's module:

me.AllowAdditions=false
me.NavigationButtons=False

or in the calling form's module:

docmd.openform "frmMyContinuousForm"
forms!frmMyContinuousForm.allowadditions=false
forms!frmMyContinuousForm.NavigationButtons=False
 
T

Tom

Sandra:

Thanks for sharing this w/ me... it works great.

I couldn't get one additional property to work...

forms!frmMyContinuousForm.Height = 1.25 or
forms!frmMyContinuousForm.Height = "1.25"

doesn't seem to work. I get the error "Application-defined or
object-defined error".

Basically, on the from the Switchboard called continuous form, I'd like to
see 3 or more records at the same time... so the form's height is larger vs.
when I calling it via command button where I want to see a specific single
record.

Any suggestion as to how I could specify a reduced height?

Thanks,
Tom







Sandra Daigle said:
In the continuous form's module:

me.AllowAdditions=false
me.NavigationButtons=False

or in the calling form's module:

docmd.openform "frmMyContinuousForm"
forms!frmMyContinuousForm.allowadditions=false
forms!frmMyContinuousForm.NavigationButtons=False
--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

I have a Continous Form... when opened from a Switchboard, I want to
be able to add new records and also show the Navigation buttons.

However, there is also an instance where I call the Continuos Form
from another form (the record of "AnotherForm" matches then record of
"ContinousForm").

In this instance, I don't want to allow a) Additions and b) view the
Navigation buttons.

Does anyone know what lines of VBA code I need to write to set the
property settings to FALSE for both "No Additions" & "No Navigation
Buttons)?


Thanks,
Tom
 
S

Sandra Daigle

Hi Tom,

The form object does not have a height property, hence the error. Instead
you need to modify the height of the section.

To adjust dimensions in VBA you must state the dimension in a unit of
measure called Twips (for more info see:
http://www.pbdr.com/vbtips/gen/convtwip.htm). There are approximately 1440
Twips per inch so your code would be . . .

forms!frmMyContinuousForm.Section(acDetail).Height = 1440 * 1.25

TwipsPerInch is actually a good candidate to be declared as a public
constant (in a standard module)

Public Const TwipsPerInch as long = 1440

Then to make your code more meaningful, change the above to:

forms!frmMyContinuousForm.Section(acDetail).Height = TwipsPerInch * 1.25

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

Sandra:

Thanks for sharing this w/ me... it works great.

I couldn't get one additional property to work...

forms!frmMyContinuousForm.Height = 1.25 or
forms!frmMyContinuousForm.Height = "1.25"

doesn't seem to work. I get the error "Application-defined or
object-defined error".

Basically, on the from the Switchboard called continuous form, I'd
like to see 3 or more records at the same time... so the form's
height is larger vs. when I calling it via command button where I
want to see a specific single record.

Any suggestion as to how I could specify a reduced height?

Thanks,
Tom







Sandra Daigle said:
In the continuous form's module:

me.AllowAdditions=false
me.NavigationButtons=False

or in the calling form's module:

docmd.openform "frmMyContinuousForm"
forms!frmMyContinuousForm.allowadditions=false
forms!frmMyContinuousForm.NavigationButtons=False
--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

I have a Continous Form... when opened from a Switchboard, I want to
be able to add new records and also show the Navigation buttons.

However, there is also an instance where I call the Continuos Form
from another form (the record of "AnotherForm" matches then record
of "ContinousForm").

In this instance, I don't want to allow a) Additions and b) view the
Navigation buttons.

Does anyone know what lines of VBA code I need to write to set the
property settings to FALSE for both "No Additions" & "No Navigation
Buttons)?


Thanks,
Tom
 
T

Tom

Sandra:

I put the code into the function as you suggested... the window size remains
unchanged though (no matter what the dimensions are).

Is there anything else I should be aware of?

Thanks,
Tom



Sandra Daigle said:
Hi Tom,

The form object does not have a height property, hence the error. Instead
you need to modify the height of the section.

To adjust dimensions in VBA you must state the dimension in a unit of
measure called Twips (for more info see:
http://www.pbdr.com/vbtips/gen/convtwip.htm). There are approximately 1440
Twips per inch so your code would be . . .

forms!frmMyContinuousForm.Section(acDetail).Height = 1440 * 1.25

TwipsPerInch is actually a good candidate to be declared as a public
constant (in a standard module)

Public Const TwipsPerInch as long = 1440

Then to make your code more meaningful, change the above to:

forms!frmMyContinuousForm.Section(acDetail).Height = TwipsPerInch * 1.25

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

Sandra:

Thanks for sharing this w/ me... it works great.

I couldn't get one additional property to work...

forms!frmMyContinuousForm.Height = 1.25 or
forms!frmMyContinuousForm.Height = "1.25"

doesn't seem to work. I get the error "Application-defined or
object-defined error".

Basically, on the from the Switchboard called continuous form, I'd
like to see 3 or more records at the same time... so the form's
height is larger vs. when I calling it via command button where I
want to see a specific single record.

Any suggestion as to how I could specify a reduced height?

Thanks,
Tom







Sandra Daigle said:
In the continuous form's module:

me.AllowAdditions=false
me.NavigationButtons=False

or in the calling form's module:

docmd.openform "frmMyContinuousForm"
forms!frmMyContinuousForm.allowadditions=false
forms!frmMyContinuousForm.NavigationButtons=False
--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


Tom wrote:
I have a Continous Form... when opened from a Switchboard, I want to
be able to add new records and also show the Navigation buttons.

However, there is also an instance where I call the Continuos Form
from another form (the record of "AnotherForm" matches then record
of "ContinousForm").

In this instance, I don't want to allow a) Additions and b) view the
Navigation buttons.

Does anyone know what lines of VBA code I need to write to set the
property settings to FALSE for both "No Additions" & "No Navigation
Buttons)?


Thanks,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top