Connecting Tech Pros Worldwide Forums | Help | Site Map

Form shrinks vertically

Lyn
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi,
I have a form which is opened from a button on another form. The form is
used to display a list of records from a recordset in Continuous Mode. It
is sized vertically to display about 25 rows and has a vertical scrollbar.
This form has been working perfectly for weeks.

However, I must have done something recently because now the detail section
displays only one row at a time. That is, the form has shrunk vertically to
about 3
cm height. Property Can Grow is set to Yes, and Can Shrink to No.

In Design View, the form still displays full height. If I go from Design
View directly to Form View, it still retains full height and displays up to
25 rows. However, if I open the form via the button, it shrinks back to a
display height of one row. All the data is there, I just have to scroll a
row at a time to see it all.

The button on the other form generates a recordset (which is Public and
accessible from either form) and then does:

DoCmd.OpenForm "frmPersonList", , , , acFormReadOnly

I cannot figure out what I might have done to screw this up, seeing as it
was working as designed weeks ago. Can anyone see the problem?

TIA for any help.

--
Cheers,
Lyn.




Arno R
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Form shrinks vertically


Lyn,
Have you tried to open the form in design view and *save* the form again ?

--
Hope this helps
Arno R


"Lyn" <lhancock@ihug.com.au> schreef in bericht news:d25jpp$144$1@lust.ihug.co.nz...[color=blue]
> In Design View, the form still displays full height. If I go from Design
> View directly to Form View, it still retains full height and displays up to
> 25 rows. However, if I open the form via the button, it shrinks back to a
> display height of one row. All the data is there, I just have to scroll a
> row at a time to see it all.[/color]
Lyn
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Form shrinks vertically


Thanks Arno. Yes, many times -- but no joy. Any other thoughts?

--
Cheers,
Lyn.


"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in message
news:42469363$0$44094$5fc3050@dreader2.news.tiscal i.nl...
Lyn,
Have you tried to open the form in design view and *save* the form again ?

--
Hope this helps
Arno R


"Lyn" <lhancock@ihug.com.au> schreef in bericht
news:d25jpp$144$1@lust.ihug.co.nz...[color=blue]
> In Design View, the form still displays full height. If I go from Design
> View directly to Form View, it still retains full height and displays up
> to
> 25 rows. However, if I open the form via the button, it shrinks back to a
> display height of one row. All the data is there, I just have to scroll a
> row at a time to see it all.[/color]


Rick Brandt
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Form shrinks vertically


"Lyn" <lhancock@ihug.com.au> wrote in message
news:d26bt1$k25$1@lust.ihug.co.nz...[color=blue]
> Thanks Arno. Yes, many times -- but no joy. Any other thoughts?[/color]

That's what I was going to suggest as well. A continuous view form's height
should be established by setting the window height in design view. However; I
usually find that I have to make some other design change prior to saving to get
the size to "stick". I'll make a label one tick wider or move a hidden control
before saving.

How is the size if you open from the db window instead of from your button?

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Lyn
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Form shrinks vertically



"Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
news:GZy1e.3473$oy3.419@newssvr30.news.prodigy.com ...[color=blue]
> "Lyn" <lhancock@ihug.com.au> wrote in message
> news:d26bt1$k25$1@lust.ihug.co.nz...[color=green]
>> Thanks Arno. Yes, many times -- but no joy. Any other thoughts?[/color]
>
> That's what I was going to suggest as well. A continuous view form's
> height should be established by setting the window height in design view.
> However; I usually find that I have to make some other design change prior
> to saving to get the size to "stick". I'll make a label one tick wider or
> move a hidden control before saving.
>
> How is the size if you open from the db window instead of from your
> button?
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>[/color]
Rick,
If I open from the DB window, I get the same small size. It is only if I
start in Design View and press the Form View button that the form opens full
size.

I must have done something recently that has caused this because the form
was working fine for weeks. But although I have tried backtracking to find
the cause, it still eludes me.

There seems to be no way to set the form height other than by dragging the
form vertically in Design View and saving it. Ie, no Height property
(except for the height of a single line in the Detail section). But for
some reason dragging vertically doesn't stick in Form View.

--
Cheers,
Lyn.


Rick Brandt
Guest
 
Posts: n/a
#6: Nov 13 '05

re: Form shrinks vertically


"Lyn" <lhancock@ihug.com.au> wrote in message
news:d26eoj$100$1@lust.ihug.co.nz...[color=blue]
> Rick,
> If I open from the DB window, I get the same small size. It is only if I
> start in Design View and press the Form View button that the form opens full
> size.
>
> I must have done something recently that has caused this because the form was
> working fine for weeks. But although I have tried backtracking to find the
> cause, it still eludes me.
>
> There seems to be no way to set the form height other than by dragging the
> form vertically in Design View and saving it. Ie, no Height property (except
> for the height of a single line in the Detail section). But for some reason
> dragging vertically doesn't stick in Form View.[/color]

Is the form still in continuous mode (you can see more records after opening by
dragging the lower frame border down), or has it reverted to single view?

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Arno R
Guest
 
Posts: n/a
#7: Nov 13 '05

re: Form shrinks vertically


Lyn,
What version of Access is this ? Corruption here ?
If the problem persists I would create a new form, copy and paste the controles and just see how this form 'acts'.
If it's allright you can also copy the form's code.

Arno R
[color=blue]
> If I open from the DB window, I get the same small size. It is only if I
> start in Design View and press the Form View button that the form opens full
> size.
>
> I must have done something recently that has caused this because the form
> was working fine for weeks. But although I have tried backtracking to find
> the cause, it still eludes me.[/color]

Lyn
Guest
 
Posts: n/a
#8: Nov 13 '05

re: Form shrinks vertically


Arno, Rick,
Firstly, to answer your questions: Access 2003, and the form remains in
Continuous Mode. Dragging the shrunken form vertically exposes all the
missing records.

Anyway, I have found the problem and have a workaround fix, although I am
not sure I understand what is going on.

I did what I should have done from the start -- I went back to a saved
version of the form from a time when it was working OK and did a comparison
of form properties, one by one. There had been a number of accumulated
changes, but the one which "caused" the problem was RecordSource. In the
newer "faulty" form, RecordSource was blank. Let me explain...

Originally the form listing was based on a query from a single table, and
the table name was set as the RecordSource. All worked OK. With further
development, the record source for the form became a union of queries from
two separate tables. This query is developed in the calling form and is
already available as a record set when the problem form is called. So when
I now open the latter form, I set the form's Recordset property to the
existing recordset. This saves exporting the query's rather complex SQL
from the calling form to the problem form (as OpenArgs?) to be set as its
RecordSource and, since the recordset is already in memory, saves
duplicating the query in the child form.

According to the Help file, setting the Recordset property of a form is
supposed to update the form's RecordSource property accordingly. So, it
seemed logical to delete the old RecordSource value from Design Mode (ie the
single table) as it was no longer valid. But doing so seems to be what
caused the shrinking problem. Anyway, my workaround for now is to restore
the old table name as the form's default RecordSource value, even though it
is not used.

Why would this cause the form to shrink? (BTW, I set the Recordset property
in the Open event -- also tried using Load event, no difference.)

Thanks again for your help.

--
Cheers,
Lyn.

"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in message
news:4246d1a2$0$44062$5fc3050@dreader2.news.tiscal i.nl...
Lyn,
What version of Access is this ? Corruption here ?
If the problem persists I would create a new form, copy and paste the
controles and just see how this form 'acts'.
If it's allright you can also copy the form's code.

Arno R
[color=blue]
> If I open from the DB window, I get the same small size. It is only if I
> start in Design View and press the Form View button that the form opens
> full
> size.
>
> I must have done something recently that has caused this because the form
> was working fine for weeks. But although I have tried backtracking to
> find
> the cause, it still eludes me.[/color]


Arno R
Guest
 
Posts: n/a
#9: Nov 13 '05

re: Form shrinks vertically


"Lyn" <lhancock@ihug.com.au> schreef in bericht news:d28d2o$gen$1@lust.ihug.co.nz...[color=blue]
> According to the Help file, setting the Recordset property of a form is
> supposed to update the form's RecordSource property accordingly. So, it
> seemed logical to delete the old RecordSource value from Design Mode (ie the
> single table) as it was no longer valid. But doing so seems to be what
> caused the shrinking problem. Anyway, my workaround for now is to restore
> the old table name as the form's default RecordSource value, even though it
> is not used.
>
> Why would this cause the form to shrink? (BTW, I set the Recordset property
> in the Open event -- also tried using Load event, no difference.)[/color]

Just a guess: AllowAdditions false ?
If AllowAdditions =False then
Access is trying to be too 'helpful' here ... no records to show >> no detail
else
I don't have a clue also ...
end if

Anyway, glad you solved your case

Arno R
Lyn
Guest
 
Posts: n/a
#10: Nov 13 '05

re: Form shrinks vertically


Allow Additions was False. Unfortunately changing it to True still required
a dummy value in RecordSource to work. Thanks for all the help though.

--
Cheers,
Lyn.

"Arno R" <arracomn_o_s_p_a_m@tiscali.nl> wrote in message
news:4247db33$0$44079$5fc3050@dreader2.news.tiscal i.nl...
"Lyn" <lhancock@ihug.com.au> schreef in bericht
news:d28d2o$gen$1@lust.ihug.co.nz...[color=blue]
> According to the Help file, setting the Recordset property of a form is
> supposed to update the form's RecordSource property accordingly. So, it
> seemed logical to delete the old RecordSource value from Design Mode (ie
> the
> single table) as it was no longer valid. But doing so seems to be what
> caused the shrinking problem. Anyway, my workaround for now is to restore
> the old table name as the form's default RecordSource value, even though
> it
> is not used.
>
> Why would this cause the form to shrink? (BTW, I set the Recordset
> property
> in the Open event -- also tried using Load event, no difference.)[/color]

Just a guess: AllowAdditions false ?
If AllowAdditions =False then
Access is trying to be too 'helpful' here ... no records to show >> no
detail
else
I don't have a clue also ...
end if

Anyway, glad you solved your case

Arno R


Closed Thread


Similar Microsoft Access / VBA bytes