POP reports in 2000-Can't get code to work

  • Thread starter szag via AccessMonster.com
  • Start date
S

szag via AccessMonster.com

First off I am not a visual basic person.

I am trying to use the following to get my reports to open in "Pop-up" mode
with the "on open" event:

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenReport "Report_R_HELPmenu", acViewPreview, WindowMode:=acDialog
End Sub

I keep getting a "Compile error:Named argument not found" for "Window Mode:=".


As I said I know little about vb and might be missing something simple...
 
A

Albert D.Kallal

The dialog option for reports was not available until a2002......

note that as you type in the command in the editor, make note of the
"parameters" that pop up as you type...
, you will notice that there is NOT a dialog option

IF the parameters don't show as you type, then likely you have other errors
in your code (the code helper called inteli-sense that helps you as you
type in code will NOT work if you have existing errors in your code...so,
you can do a debug-compile while looking at the code to fix existing
errors).

After you done the above, now, try typing in that line of code to open the
report...note how no dialog option comes up...
 
S

szag via AccessMonster.com

Thanks, that helps!

Do you have advice then as to how to get a report to run to the screen in
front of the form in 2000? It goes behind and the user is left wondering
where it went.
 
A

Albert D.Kallal

szag via AccessMonster.com said:
Thanks, that helps!

Do you have advice then as to how to get a report to run to the screen in
front of the form in 2000? It goes behind and the user is left wondering
where it went.

Well, actually, I do, but the answer is not what you going to like!!

First, why are any of the forms you currently have set to popup anyway?
There is NO need for this. If you need a form to stay on top of the previous
form..then use the forms model property setting in the "other" tab of the
forms property. What happens in these cases, is a user does not think this
out..and for some reason sets ONE form to popup. Well, once you do that, you
are duck soup, as not this form will stay on top of everything. Now, you
madly start modifying all forms to popup, so they stay on top of each other.
A really big mistake. the popup setting is for wizard type forms, or even
data display forms that ALWAYS stay on top, but do NOT have to have the
focus. To use the popup setting for anything else really destroys the whole
application flow, and damages your ability to correctly use model forms.

So, I would simply remove all of the popup settings. Use the model setting,
and any form launched will REMAIN on top, and the user will be forced to
close the forms in the order they opened them. If you do this then when you
launch your report...it will remain on top.

Further, read the following article of mine to understand the difference
between model forms, and dialog forms.....

http://www.members.shaw.ca/AlbertKallal/Dialog/Index.html

If you are in fact using dialog forms, then the reprot will NOT stay on
top..and you need a2002 or later....
--

Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal
 
S

szag via AccessMonster.com

Excellent!

You are right I did not know the difference. The once reason I went with Pop-
up is it allowed me to remove borders, the access menu, etc to give the
database a better feel and not confuse the users. Is there still away to
eliminate this without using the "pop-up" feature? The end users like this
"non-Access" feel.
 
A

Albert D.Kallal

szag via AccessMonster.com said:
Excellent!

Good for you...you have a *great* attitude towards learning!! When I said
you will not like the answer, in effect I said this was because I was about
to come down hard on the use of popup forms.....
Is there still away to
eliminate this without using the "pop-up" feature? The end users like this
"non-Access" feel.

Yes, actually, the popup setting does not much change how the form looks.

I would suggest you set the broader to sizable;. And WHILE viewing the form,
size the form EXACTLY the way you want. You then hit ctrl-s to save the
form. now, flip back into design mode..and set the border style to thin
(and, of course save again). This way, your form will be sized exactly the
way you want, but users will not be able to change the form size. Remember,
don't forget to set the forms auto-center = yes, and you MUST set the forms
auto resize property = no (if you don't do this...it will drive to a room
with padded walls).

So, border = sizable ....re-size form the way you want in view mode
......ctrl-s....now flip into design mode..and change style to thin....
You will thus have forms set EXACTLY the way YOU the designer wants them to
be.

As for controlling the menus...and hiding the rest of ms-access....I cut and
past my "standard" response as follows:

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc). Also, using these options means you
do not have to bother setting up security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.
You can get this at:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
 

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