Results 1 to 10 of 10
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Positioning of form (Access 97)

    I am working with a form that I want to open to a certain height and width. I got that part down using the following on the form open event.
    Me.InsideWidth = 2.5 * 1440
    Me.InsideHeight = 1.5 * 1440

    At this size the form has one textbox without label on the form. The problem is that the form always opens up with the left edge of the textbox against the edge of the window. There is about 1/4 inch of form displayed to the left of the textbox when in design view.

    Is there anyway to show bland form to the left of the textbox? Thanks Fay

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Positioning of form (Access 97)

    Forms have an autocenter property that causes them to center on the current window. Do you have that set to yes so that the form is being displayed off the edge? It looks to me like your code would make the form quite large.
    Wendell

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Positioning of form (Access 97)

    Is the text box very wide? Access will try to display as much as possible of the control that has the focus, so if it is almost as wide as the form window, or wider, the form will be scrolled.

    (It's up to you as designer to decide how bland the form will be)

  4. #4
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Positioning of form (Access 97)

    Thanks for your responses.
    The form is only about 2.5 inches wide. I had the AutoCenter to yes changed it to No. That did not work.
    The textbox was within the visible size of the form. I did make it smaller without success.

    Fay

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Positioning of form (Access 97)

    Fay
    Not sure if this is what you needed but, this is what I use to position the frm and set it's size:

    DoCmd.MoveSize Right:=5955, Down:=1650, Width:=5925, Height:=6000

    If you alter the parameters, I'm sure it will serve your purpose.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Positioning of form (Access 97)

    Fay,

    See sceenshots (for Access 2002 on Windows XP). As in your code, the InsideWidth is set to 2.5". In the top picture, the text box is 1.55" wide, in the bottom picture 2.35". In both cases the text box is less wide than the inside width, but still the text box is shifted to the left in the bottom picture.
    Attached Images Attached Images
    • File Type: png x.png (7.2 KB, 0 views)

  7. #7
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Positioning of form (Access 97)

    The size of the textbox was already only 1.5 inches in length. I tried the code that Dave sent without success either. Thanks. Fay

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Positioning of form (Access 97)

    As I mentioned, my previous test was in Access 2002. I just started up a PC with Access 97, and I can't reproduce the behavior you describe. The text box only gets shifted to the left if it is (almost) too wide to fit inside the window, otherwise it is displayed at the position specified in the Properties window. I can't find anything about it in the Knowledge Base or in the newsgroups either. So I'm sorry...

  9. #9
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Positioning of form (Access 97)

    Thanks for trying. It isn't a situation that breaks the project. I can live with it. It is just the fussiness in me that wants it to work like it should.

    Fay

  10. #10
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Positioning of form (Access 97)

    I got it to work. But I had to recreate the whole deal. Fay

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •