Opening a continuous form as acDialog, Access 2002

J

Joseph Ellis

Hello all,

I am trying to open a "Search Results" continuous form in acDialog
mode, but it will only display as a single form.

I have tried:

DoCmd.OpenForm "frmSearchResults", , , "[hhLastName] = ""Klein""",
acFormReadOnly, acDialog

As well as the simpler:

DoCmd.OpenForm "frmSearchResults", WindowMode:=acDialog

as suggested by Allen Browne in an earlier post.

I can sort of work around this by opening the form as a datasheet, but
it makes me unhappy.

I am using Access 2002, though the file I am working on is saved in
Access 2000 format. If this is the source of the problem, I suppose I
would have no difficulty converting it to 2002 format.

Thanks for any suggestions,
Joseph
 
W

Wayne Morgan

Joseph,

I just tried it in the immediate window using Access 2003 with a form set
that is set to Continuous in its Properties sheet and it worked. The file is
in Access 2000 format.

Are you really using

"[hhLastName] = ""Klein"""

or are you trying to concatenate in the value from the form doing the
calling in place of Klein? If the latter, it can be done; please post the
actuall code line.
 
J

Joseph Ellis

Hello all,

I am trying to open a "Search Results" continuous form in acDialog
mode, but it will only display as a single form.

I have tried:

DoCmd.OpenForm "frmSearchResults", , , "[hhLastName] = ""Klein""",
acFormReadOnly, acDialog

As well as the simpler:

DoCmd.OpenForm "frmSearchResults", WindowMode:=acDialog

as suggested by Allen Browne in an earlier post.

I can sort of work around this by opening the form as a datasheet, but
it makes me unhappy.

I am using Access 2002, though the file I am working on is saved in
Access 2000 format. If this is the source of the problem, I suppose I
would have no difficulty converting it to 2002 format.

Thanks for any suggestions,
Joseph

Ok, I've found that the problem does not occur if I open
frmSearchResults BEFORE activating the OpenForm action. So if I open
the form normally, it displays as a continuous form, unfiltered, and
takes up most of the screen. Then when I activate the first OpenForm
action above via a command button in another form, the (already
opened) frmSearchResults opens as an acDialog continuous form. In
this case, it displays all three records where [hhLastName] = "Klein",
but still takes up most of the screen.

There must be a way to make this work the way it's "supposed" to.
 
J

Joseph Ellis

Hello again, Wayne

In working out the instructions you provided me in an earlier post
(I'm having to learn each step as I go), I've made a test form which
is unbound and contains a single command button with the following
code on its OnClick event:

Private Sub cmdOpenForm_Click()
DoCmd.OpenForm "frmSearchResults", , , "[hhLastName] Like
""Kle*""", acFormReadOnly, acDialog
End Sub

Eventually I will replace the "[hhLastName] Like ""Kle*""" with a
string passed from a control on a "real life" form. But for now, this
is what I'm working with as I learn. Does this make a significant
difference?
 
J

Joseph Ellis

Nevermind, I figured it out.

I had inadvertently set the form's window size to a height that only
allowed 1 record to be in view at a time. It was just pure luck. If
it had been displaying, say, 1.5 records at a time, I think I would
have clued in on what was going on a little sooner.

I just assumed that the form's window would resize to accommodate all
the records. Is there a way to do that programmatically?

Hello again, Wayne

In working out the instructions you provided me in an earlier post
(I'm having to learn each step as I go), I've made a test form which
is unbound and contains a single command button with the following
code on its OnClick event:

Private Sub cmdOpenForm_Click()
DoCmd.OpenForm "frmSearchResults", , , "[hhLastName] Like
""Kle*""", acFormReadOnly, acDialog
End Sub

Eventually I will replace the "[hhLastName] Like ""Kle*""" with a
string passed from a control on a "real life" form. But for now, this
is what I'm working with as I learn. Does this make a significant
difference?



Joseph,

I just tried it in the immediate window using Access 2003 with a form set
that is set to Continuous in its Properties sheet and it worked. The file is
in Access 2000 format.

Are you really using

"[hhLastName] = ""Klein"""

or are you trying to concatenate in the value from the form doing the
calling in place of Klein? If the latter, it can be done; please post the
actuall code line.
 
Joined
Jan 27, 2006
Messages
1
Reaction score
0
Thank You!

I found this thread after a seemingly endless search to find out why my modal continuous form wouldn't show more than one record. I normally design forms in maximized windows (I mean they're maximized in the designer), and had no idea that the WINDOW size (once you leave maximized mode in the designer) is what determines how many records show up in the detail section of a continuous form. I'd have thought it would be the form size, not the window size. I'm sure this is all my fault, but it seems incredibly confusing and counter-intuitive. Sorry my explanation is not better, I don't know all of the correct terminology and phrasing. Hopefully anyone reading this can figure out what I'm talking about.

Anyway, this thread cleared it up for me. I think Microsoft needs to do something to improve this behavior, please! Not sure what a better implementation would be, I'll leave that for the experts.

- Will
 

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