Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

acDialog not letting me access menus

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 30 Apr 2005 17:29 GMT
I have a main form (frmGetCustomer) that opens another form (frmCustomer) to
a specific record.  I am using acDialog because I want the code to pause
because the next line is a requery for the main form.  So if there is any
changes the main form will be updated.  However, when I am using acDialog the
form acts like it is modal and popup.  I open frmCustomer from many different
forms.  Is there a way to have frmCustomer requery any form that it is opened
from?  like: forms.parent.requery
Ken Snell [MVP] - 30 Apr 2005 17:51 GMT
Pass the name of the form to be requeried in the OpenArgs string when you
open frmCustomer:

   DoCmd.OpenForm "frmCustomer", , , , , acDialog, "NameOfFormToRequery"

Then use Me.OpenArgs in the frmCustomer form to do the requery:
   Forms(Me.OpenArgs).Requery

Signature

       Ken Snell
<MS ACCESS MVP>

>I have a main form (frmGetCustomer) that opens another form (frmCustomer)
>to
[quoted text clipped - 7 lines]
> opened
> from?  like: forms.parent.requery
James - 30 Apr 2005 21:03 GMT
First, thank you for your help.  You have acDialog, but I cannot use that
because when they open a report (to view) from frmCustomer access will not
let you print the report.  Am I doing something wrong with the report because
I cannot get to the menu bar to print?  The report has the focus and seems to
be modal, but both modal and popup are set to no in the reports properties.

> Pass the name of the form to be requeried in the OpenArgs string when you
> open frmCustomer:
[quoted text clipped - 15 lines]
> > opened
> > from?  like: forms.parent.requery
Albert D. Kallal - 30 Apr 2005 21:36 GMT
acDialog forms do not let anything else get the focus.

You really only want to use acDialog forms for promopts etc...not for
general data forms.

You can read about dialog forms..and model forms here:

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

Anyway...see my other post..as  you have many other approaches available
here...

Signature

Albert D. Kallal   (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com
http://www.members.shaw.ca/AlbertKallal

Albert D. Kallal - 30 Apr 2005 20:59 GMT
You can just use the forms Activate event.

The form then can call any other form (make those other forms model..not
acDialog). When the user closes the form, the calling forms on-activate
event will fire. So, you don't need any code in the frmGetCustomer.

> Is there a way to have frmCustomer requery any form that it is opened
> from?  like: forms.parent.requery

Hum...the above is the reversing of your original question..is it not?

You can most certainly pick up the calling form. In fact, you would
normally use the on-open event..but you can even pick up the previous forms
name as LATE as the on-load event.

So, just declare a local module level var for frmCustomer

dim frmPrevous         as form

Now, in the on-load event, we go:

set frmPrevious = screen.ActiveForm

Now, anywhere in your forms code, you can go:

frmPrevous.Refresh           (force a disk write in the previous form)

or

frmPrevous.Requery      (force a requery in the previous form)

or

msgbox "number of records in previous form is " &
frmPrevous.RecordSetClone.RecordCount

Signature

Albert D. Kallal   (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com
http://www.members.shaw.ca/AlbertKallal

James - 30 Apr 2005 21:32 GMT
Thanks for the help.  And yes it was a re-worded question!

> You can just use the forms Activate event.
>
[quoted text clipped - 31 lines]
> msgbox "number of records in previous form is " &
> frmPrevous.RecordSetClone.RecordCount
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.