PC Review


Reply
Thread Tools Rate Thread

Dialog form opens wrong

 
 
accesswanabe
Guest
Posts: n/a
 
      6th Jan 2010
I have a form that I am trying to use as a modal dialog. I have the form's
PopUp and Modal properties set to Yes. I open the form using vba with the
following: DoCmd.OpenForm "frmInvoiceItemsforDaily", , , , , acDialog

I also have the form's Border Style set to Sizeable. This is because I
would like the dialog to be a certain size. When I save the form in form
view after sizing it the way I want, the next time the code runs, the form
displays as intended. The very next time the code runs, the form becomes
tiny...no data or fields are visible. Not sure what to do about this problem.

Anyone have any ideas?
 
Reply With Quote
 
 
 
 
Jack Leach
Guest
Posts: n/a
 
      6th Jan 2010
When opening a form using DoCmd.OpenForm acDialog, you do not need the Modal
and Popup properties of that form to be set. I don't know if this is causing
the issue, but you may want to try it without them on.

Check the AutoResize property of the form as well... this should
automatically resize the form to whatever it's saved during design view.

If you really want to force the form to be a certain size, set each form
section Height property, and the form Width property in the Open event...

Me.Section("Header").Height = SomeNum
Me.Section("Detail").Height = SomeNum
Me.Section("Footer").Height = SomeNum
Me.Width = SomeNum

note that VBA uses Twips as it's unit... 1/20th of an imperial inch.
Therefore, 1inch = 1440 Twips


hth
--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)



"accesswanabe" wrote:

> I have a form that I am trying to use as a modal dialog. I have the form's
> PopUp and Modal properties set to Yes. I open the form using vba with the
> following: DoCmd.OpenForm "frmInvoiceItemsforDaily", , , , , acDialog
>
> I also have the form's Border Style set to Sizeable. This is because I
> would like the dialog to be a certain size. When I save the form in form
> view after sizing it the way I want, the next time the code runs, the form
> displays as intended. The very next time the code runs, the form becomes
> tiny...no data or fields are visible. Not sure what to do about this problem.
>
> Anyone have any ideas?

 
Reply With Quote
 
accesswanabe
Guest
Posts: n/a
 
      6th Jan 2010
Thanks Jack, one very important thing I realize I forgot to mention is that
it is a continuous form, so resizing section heights doesn't seem to be an
option. Basically, I have a form that collects timesheet information for
various trades. From that form I a have a button that opens this particular
dialog form to show invoiceable items for the timesheet. Before the form
opens, I create the underlying table for the dialog form with queries that
analize the data on the timesheet form for invoiceable items. The number of
records for each timesheet can be substantially different. For example, a
welder's timesheet might have one invoiceable item while a laborer's might
have several invoice items. I want to show these items in a list and that is
why I thought it would be best to use a continuous form. Do you have a
recommendation for a solution for a form that would do this?

"Jack Leach" wrote:

> When opening a form using DoCmd.OpenForm acDialog, you do not need the Modal
> and Popup properties of that form to be set. I don't know if this is causing
> the issue, but you may want to try it without them on.
>
> Check the AutoResize property of the form as well... this should
> automatically resize the form to whatever it's saved during design view.
>
> If you really want to force the form to be a certain size, set each form
> section Height property, and the form Width property in the Open event...
>
> Me.Section("Header").Height = SomeNum
> Me.Section("Detail").Height = SomeNum
> Me.Section("Footer").Height = SomeNum
> Me.Width = SomeNum
>
> note that VBA uses Twips as it's unit... 1/20th of an imperial inch.
> Therefore, 1inch = 1440 Twips
>
>
> hth
> --
> Jack Leach
> www.tristatemachine.com
>
> "I haven''t failed, I''ve found ten thousand ways that don''t work."
> -Thomas Edison (1847-1931)
>
>
>
> "accesswanabe" wrote:
>
> > I have a form that I am trying to use as a modal dialog. I have the form's
> > PopUp and Modal properties set to Yes. I open the form using vba with the
> > following: DoCmd.OpenForm "frmInvoiceItemsforDaily", , , , , acDialog
> >
> > I also have the form's Border Style set to Sizeable. This is because I
> > would like the dialog to be a certain size. When I save the form in form
> > view after sizing it the way I want, the next time the code runs, the form
> > displays as intended. The very next time the code runs, the form becomes
> > tiny...no data or fields are visible. Not sure what to do about this problem.
> >
> > Anyone have any ideas?

 
Reply With Quote
 
Jack Leach
Guest
Posts: n/a
 
      6th Jan 2010
I don't often use continuous forms myself, but I'm wondering if you can do
this using a subform. Make an unbound form to hold a subform (that would be
your continuous form). I think this way you might get a bit more control
over the unbound mainform, as well as the size of the subform control that
will dictate how your user see's the information.

Maybe there's a simpler solution than this. Having an extra form just for
sizing reasons does seem a bit much, but I'm really not that versed with
continous forms so I don't know their quirks.

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)



"accesswanabe" wrote:

> Thanks Jack, one very important thing I realize I forgot to mention is that
> it is a continuous form, so resizing section heights doesn't seem to be an
> option. Basically, I have a form that collects timesheet information for
> various trades. From that form I a have a button that opens this particular
> dialog form to show invoiceable items for the timesheet. Before the form
> opens, I create the underlying table for the dialog form with queries that
> analize the data on the timesheet form for invoiceable items. The number of
> records for each timesheet can be substantially different. For example, a
> welder's timesheet might have one invoiceable item while a laborer's might
> have several invoice items. I want to show these items in a list and that is
> why I thought it would be best to use a continuous form. Do you have a
> recommendation for a solution for a form that would do this?
>
> "Jack Leach" wrote:
>
> > When opening a form using DoCmd.OpenForm acDialog, you do not need the Modal
> > and Popup properties of that form to be set. I don't know if this is causing
> > the issue, but you may want to try it without them on.
> >
> > Check the AutoResize property of the form as well... this should
> > automatically resize the form to whatever it's saved during design view.
> >
> > If you really want to force the form to be a certain size, set each form
> > section Height property, and the form Width property in the Open event...
> >
> > Me.Section("Header").Height = SomeNum
> > Me.Section("Detail").Height = SomeNum
> > Me.Section("Footer").Height = SomeNum
> > Me.Width = SomeNum
> >
> > note that VBA uses Twips as it's unit... 1/20th of an imperial inch.
> > Therefore, 1inch = 1440 Twips
> >
> >
> > hth
> > --
> > Jack Leach
> > www.tristatemachine.com
> >
> > "I haven''t failed, I''ve found ten thousand ways that don''t work."
> > -Thomas Edison (1847-1931)
> >
> >
> >
> > "accesswanabe" wrote:
> >
> > > I have a form that I am trying to use as a modal dialog. I have the form's
> > > PopUp and Modal properties set to Yes. I open the form using vba with the
> > > following: DoCmd.OpenForm "frmInvoiceItemsforDaily", , , , , acDialog
> > >
> > > I also have the form's Border Style set to Sizeable. This is because I
> > > would like the dialog to be a certain size. When I save the form in form
> > > view after sizing it the way I want, the next time the code runs, the form
> > > displays as intended. The very next time the code runs, the form becomes
> > > tiny...no data or fields are visible. Not sure what to do about this problem.
> > >
> > > Anyone have any ideas?

 
Reply With Quote
 
accesswanabe
Guest
Posts: n/a
 
      6th Jan 2010
Thanks Jack. I sure appreciate your help.

"Jack Leach" wrote:

> I don't often use continuous forms myself, but I'm wondering if you can do
> this using a subform. Make an unbound form to hold a subform (that would be
> your continuous form). I think this way you might get a bit more control
> over the unbound mainform, as well as the size of the subform control that
> will dictate how your user see's the information.
>
> Maybe there's a simpler solution than this. Having an extra form just for
> sizing reasons does seem a bit much, but I'm really not that versed with
> continous forms so I don't know their quirks.
>
> --
> Jack Leach
> www.tristatemachine.com
>
> "I haven't failed, I've found ten thousand ways that don't work."
> -Thomas Edison (1847-1931)
>
>
>
> "accesswanabe" wrote:
>
> > Thanks Jack, one very important thing I realize I forgot to mention is that
> > it is a continuous form, so resizing section heights doesn't seem to be an
> > option. Basically, I have a form that collects timesheet information for
> > various trades. From that form I a have a button that opens this particular
> > dialog form to show invoiceable items for the timesheet. Before the form
> > opens, I create the underlying table for the dialog form with queries that
> > analize the data on the timesheet form for invoiceable items. The number of
> > records for each timesheet can be substantially different. For example, a
> > welder's timesheet might have one invoiceable item while a laborer's might
> > have several invoice items. I want to show these items in a list and that is
> > why I thought it would be best to use a continuous form. Do you have a
> > recommendation for a solution for a form that would do this?
> >
> > "Jack Leach" wrote:
> >
> > > When opening a form using DoCmd.OpenForm acDialog, you do not need the Modal
> > > and Popup properties of that form to be set. I don't know if this is causing
> > > the issue, but you may want to try it without them on.
> > >
> > > Check the AutoResize property of the form as well... this should
> > > automatically resize the form to whatever it's saved during design view.
> > >
> > > If you really want to force the form to be a certain size, set each form
> > > section Height property, and the form Width property in the Open event...
> > >
> > > Me.Section("Header").Height = SomeNum
> > > Me.Section("Detail").Height = SomeNum
> > > Me.Section("Footer").Height = SomeNum
> > > Me.Width = SomeNum
> > >
> > > note that VBA uses Twips as it's unit... 1/20th of an imperial inch.
> > > Therefore, 1inch = 1440 Twips
> > >
> > >
> > > hth
> > > --
> > > Jack Leach
> > > www.tristatemachine.com
> > >
> > > "I haven''t failed, I''ve found ten thousand ways that don''t work."
> > > -Thomas Edison (1847-1931)
> > >
> > >
> > >
> > > "accesswanabe" wrote:
> > >
> > > > I have a form that I am trying to use as a modal dialog. I have the form's
> > > > PopUp and Modal properties set to Yes. I open the form using vba with the
> > > > following: DoCmd.OpenForm "frmInvoiceItemsforDaily", , , , , acDialog
> > > >
> > > > I also have the form's Border Style set to Sizeable. This is because I
> > > > would like the dialog to be a certain size. When I save the form in form
> > > > view after sizing it the way I want, the next time the code runs, the form
> > > > displays as intended. The very next time the code runs, the form becomes
> > > > tiny...no data or fields are visible. Not sure what to do about this problem.
> > > >
> > > > Anyone have any ideas?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share My Calendar opens wrong dialog box =?Utf-8?B?Q2hhcmxlcyBpbiBJcmFx?= Microsoft Outlook Discussion 1 8th Oct 2006 02:15 AM
Command Button Opens the Wrong Form =?Utf-8?B?QW5uYQ==?= Microsoft Access Forms 4 24th Mar 2006 05:37 PM
Form opens in wrong view when opened from teh switchboard =?Utf-8?B?ZHdpbmdmaWU=?= Microsoft Access Forms 1 20th Oct 2004 03:49 PM
Re: Wrong Form Opens Sue Mosher [MVP-Outlook] Microsoft Outlook Form Programming 2 6th May 2004 08:08 PM
Calendar OCX on form opens to wrong date C. Fielding Microsoft Access Form Coding 1 16th Dec 2003 07:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:00 AM.