Re: Arranging several forms (subforms)
- From: Defemex <emexxus@xxxxxxxxx>
- Date: Mon, 9 Mar 2009 08:20:20 -0700 (PDT)
On Feb 28, 7:23 pm, Rod Plastow <RodPlas...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Hi Nicola,
Sorry, I did reply last Friday but when I posted the content it was reported
that I had lost contact with the server – timed out presumably. There is no
way that I could find of recovering my post! I then waited to see if it was
delayed in the system but unfortunately it seems I have to rewrite it.
I shall confine this response purely to pop-up modal forms and not attempt a
critique of your data design. No I did not mean that you cannot edit data
from pop-up forms; of course you can; they are no different from ordinary
forms, just displayed in a different way. However I would suggest you do not
allow any edits of the linking values.
Design your forms in the normal way but pay attention to the following
Property *** entries.
On the Data tab:
Make sure the Record Source is linked to a table or query to enable
automatic updating of your edits;
Set Data Entry to ‘No’ and Allow Edits and Allow Filters to ‘Yes.’ These
are the defaults.
I suggest you set Allow Additions to ‘No.’ Only set it to ‘Yes’ if the
pop-up form is based on separate, discrete table(s) from your main table
(i.e. typically displayed as a Continuous Form).
Similarly I suggest you set Allow Deletions to ‘No.’
On the Other tab:
You may set Pop Up and Modal to ‘Yes’ but you will set these values anyway
when you open the form.
On your main form include a Command Button for each and every pop-up form..
In the On Click event of each Command Button code something similar to the
following procedure. Don’t use the control wizard as this does not allow you
to specify linking criteria.
Private Sub Command1_Click()
Dim strCriteria As String
strCriteria = "IDCOURSE = " & Me.IDCOURSE & " AND IDPEOPLE = " &
Me.IDPEOPLE
DoCmd.OpenForm "Form1", , , strCriteria, , acDialog
End Sub
I can’t be exact because I do not know your requirements but I assume that
you are linking on course and person and that IDCOURSE and IDPEOPLE are
foreign keys in the table or query upon which your pop-up is based. I assume
these values are numeric.
I also assume you have columns in the underlying result set of your main
form named IDCOURSE and IDPEOPLE, hence Me.IDCOURSE and Me.IDPEOPLE. I also
assume these are numeric.
The DoCmd has three arguments of interest: the first is the name of your
pop-up form; the fourth is the linking/filtering clause which in this case is
encoded in a string variable; and the sixth that is an instruction to Access
to display the form as pop-up and modal.
Alter the foregoing according to your requirements and names and you should
be OK.
Rod
I would just like to throw my two cents into this one. I have recent
implemented a FullScreen switchboard window which contains one main
Subform that is almost the whole area of the screen. At the bottom of
my switchboard I placed a 1" footer which contains many buttons. Each
button changes the main subform.sourceobject to any form I like. After
I made the switchboard a fullscreen window, all other forms become
fullscreen when opened, so to counter that I made them all popups.
Some of these popups forms insert/update records in underlying tables
that the popup forms are linked to. The reason I am posting here is
because recently I've found that I cannot insert/update underlying
tables from popup forms. For whatever reason they failed to update the
BE, they keep a local record on the ODBC linked table, but when
refreshed or application restart they are gone (along with any insert/
updates after the initial popup insert). Major problem as records are
being lost. Got any ideas? There was mention of popup insert/update in
this post... and I'm hunting for a solution.
Thanks a bunch,
Dan
.
- Follow-Ups:
- Re: Arranging several forms (subforms)
- From: Rod Plastow
- Re: Arranging several forms (subforms)
- References:
- RE: Arranging several forms (subforms)
- From: Rod Plastow
- RE: Arranging several forms (subforms)
- Prev by Date: Re: Expire Entry
- Next by Date: Automatically create folder
- Previous by thread: RE: Arranging several forms (subforms)
- Next by thread: Re: Arranging several forms (subforms)
- Index(es):