Min/Max Buttons Again

D

Dan

Hi;

I'm going to try this again :) I am developing in Office
XP.

I have two forms, "Beans" and "Sprouts". "Beans" opens
the form "Sprouts". So, when "Sprouts" opens up, "Beans"
will always be open.

MY PROBLEM: On the open procedure for "Sprouts" I want
to disable the MinMaxButtons and the Close button
on "Beans".

I have tried the folliwng code:

Form![Beans]!MinMaxButtons = 0 but I get the runtime
error "Microsoft Access can't find the
field 'MinMaxButtons' refered to in your expression".

What should the actual code be? I need the close button
too.

Thanks,
Dan
 
D

Dan

Thanks Neil;

Actually "Sprouts" is a comments form for "Beans" which
is a data maintenance form. I'm not sure what you mean
by "modal form". How do you do that?

Thanks Again,
Dan
-----Original Message-----
Hi Dan,

You can only set the MinMaxButtons in design view. Why do you need to hide
these buttons in the first place? Could you make "Sprouts" a modal form so
that the user cant change anything to "Beans"?

Also, FYI, use . instead of ! when accessing an objects properties or
methods. e.g.

Forms![Beans].MinMaxButtons = 0

I beleive you only use the ! operator when referencing fields (or objects).
(dont quote me on that tho...)

HTH,

Neil.

Dan said:
Hi;

I'm going to try this again :) I am developing in Office
XP.

I have two forms, "Beans" and "Sprouts". "Beans" opens
the form "Sprouts". So, when "Sprouts" opens up, "Beans"
will always be open.

MY PROBLEM: On the open procedure for "Sprouts" I want
to disable the MinMaxButtons and the Close button
on "Beans".

I have tried the folliwng code:

Form![Beans]!MinMaxButtons = 0 but I get the runtime
error "Microsoft Access can't find the
field 'MinMaxButtons' refered to in your expression".

What should the actual code be? I need the close button
too.

Thanks,
Dan


.
 
N

Neil

In the forms properties (you can get to these by double clicking in the
square found in the top-right corner of any form inbetween the 2 rulers),
under 'Other', change modal to yes. Doing this will mean "Sprouts" will
always have the focus. No one can do anything with "Beans" (or any other
form) until "Sprouts" has been closed.

HTH,

Neil.

Dan said:
Thanks Neil;

Actually "Sprouts" is a comments form for "Beans" which
is a data maintenance form. I'm not sure what you mean
by "modal form". How do you do that?

Thanks Again,
Dan
-----Original Message-----
Hi Dan,

You can only set the MinMaxButtons in design view. Why do you need to hide
these buttons in the first place? Could you make "Sprouts" a modal form so
that the user cant change anything to "Beans"?

Also, FYI, use . instead of ! when accessing an objects properties or
methods. e.g.

Forms![Beans].MinMaxButtons = 0

I beleive you only use the ! operator when referencing fields (or objects).
(dont quote me on that tho...)

HTH,

Neil.

Dan said:
Hi;

I'm going to try this again :) I am developing in Office
XP.

I have two forms, "Beans" and "Sprouts". "Beans" opens
the form "Sprouts". So, when "Sprouts" opens up, "Beans"
will always be open.

MY PROBLEM: On the open procedure for "Sprouts" I want
to disable the MinMaxButtons and the Close button
on "Beans".

I have tried the folliwng code:

Form![Beans]!MinMaxButtons = 0 but I get the runtime
error "Microsoft Access can't find the
field 'MinMaxButtons' refered to in your expression".

What should the actual code be? I need the close button
too.

Thanks,
Dan


.
 
W

Wayne Morgan

When you open the form, set the WindowMode argument of the DoCmd.OpenForm call to
acDialog. This will make the pop-up form keep the focus and will halt the code procedure
that opened the form until you close or hide it.
 
D

Dan

Wow!

Thanks Neil, that's exactly what I need.

Dan
-----Original Message-----
In the forms properties (you can get to these by double clicking in the
square found in the top-right corner of any form inbetween the 2 rulers),
under 'Other', change modal to yes. Doing this will mean "Sprouts" will
always have the focus. No one can do anything with "Beans" (or any other
form) until "Sprouts" has been closed.

HTH,

Neil.

Dan said:
Thanks Neil;

Actually "Sprouts" is a comments form for "Beans" which
is a data maintenance form. I'm not sure what you mean
by "modal form". How do you do that?

Thanks Again,
Dan
-----Original Message-----
Hi Dan,

You can only set the MinMaxButtons in design view. Why do you need to hide
these buttons in the first place? Could you make "Sprouts" a modal form so
that the user cant change anything to "Beans"?

Also, FYI, use . instead of ! when accessing an
objects
properties or
methods. e.g.

Forms![Beans].MinMaxButtons = 0

I beleive you only use the ! operator when referencing fields (or objects).
(dont quote me on that tho...)

HTH,

Neil.

Hi;

I'm going to try this again :) I am developing in Office
XP.

I have two forms, "Beans" and "Sprouts". "Beans" opens
the form "Sprouts". So, when "Sprouts" opens up, "Beans"
will always be open.

MY PROBLEM: On the open procedure for "Sprouts" I want
to disable the MinMaxButtons and the Close button
on "Beans".

I have tried the folliwng code:

Form![Beans]!MinMaxButtons = 0 but I get the runtime
error "Microsoft Access can't find the
field 'MinMaxButtons' refered to in your expression".

What should the actual code be? I need the close button
too.

Thanks,
Dan



.


.
 

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