Continuous forms - yet another question

L

Larry Kahm

A company can have multiple locations (e.g., NY, Boston, Washington, DC),
with only one as the primary (NY).

In a continuous form, I'd like to show all primary locations, and provide
the opportunity to view the secondary locations - similar to what Lotus
Notes uses in the form of a "twistie" by letting the user click a button.

Is this possible in Access 2003 and would anyone have an example they'd like
to share?

Thanks!

Larry
 
A

Albert D. Kallal

You can simple use "two" subforms side by side. As you navigate the left
side, you see details on the right side.

Take a look at the 1st, and especially the last screen shot here:


http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

You can have the "child" (2nd subform on the right) to follow the 1st
via the on current event in the left side sub form as :

me.Parent.Child2.Requery.


In the link child/master settings for child 2 form you place

linkChildFields main_id (whatever is the name of the field in
this sub-form that is used to relate back to the parent table)
LinkMasterFields [MasterForm].[form].[ID] ("masterForm" is the name of
the control you used to hold the master form on the left side...
 
L

Larry Kahm

Albert,

Thank you, I've seen your response to something similar in the past.
However, the "side-by-side" approach won't fit well for the number of fields
that are involved (size plays a big part of this display).

I'm thinking I may have to show all of the records, and simply filter out
those that aren't primary...

Larry
 
J

John W. Vinson

A company can have multiple locations (e.g., NY, Boston, Washington, DC),
with only one as the primary (NY).

In a continuous form, I'd like to show all primary locations, and provide
the opportunity to view the secondary locations - similar to what Lotus
Notes uses in the form of a "twistie" by letting the user click a button.

I'd suggest having a continuous form with a button in the header. In the
button put code such as:

Private Sub cmdShowAll_Click()
' Check to see if the form is already filtered
If Me.Filter & "" = "" Then
Me.Filter = "[Primary] = True"
Me.cmdShowAll.Caption = "Show only primary locations"
Me.FilterOn = True
Else
Me.Filter = ""
Me.cmdShowAll.Caption = "Show all locations"
Me.FilterOn = False
End If
End Sub

This will toggle between showing only primary and all locations.
 
L

Larry Kahm

Peter,

While this utility might be very useful, your cautionary note prevents me
from employing this solution:

"Unfortunately, there seems to be a bug in Access which prevents a form that
contains a Flex Grid control being imported (or even copied within the
database) into another Access database. If you do, the size of the .mdb file
increases in size considerably and it also gets badly corrupted. DO NOT TRY
IT without making a back up copy first.



The best way to move a form to another database is to make a copy of the
..mdb file, delete the Flex Grid control from the form and then import the
form, this moves all the VBA code and any other controls to the new project.
Then place a new Flex Grid control on the form in the new project and change
the name and any properties to the settings that they were on the original.
"

I develop at my location and deploy at the customer's site. At that point,
all I do is import objects (forms, queries, modules) from a transfer.mdb
file, test them, and release an mde. I usually don't have the time to start
customizing or rebuilding forms on site.

Thanks!

Larry
 
P

Peter Hibbs

Larry,

A couple of points.

I may have been a bit hasty about the 'bug', it happened to me on one
database only and other users have reported no such problems so I
would not worry too much about that. Obviously you should always make
back-ups before importing any objects but I don't think you would have
any problems.

Regarding your procedure for updating your client's version, it sounds
to me as if you are doing it all wrong. Am I right in saying that you
develop this database at your location and then, when you want to
update your client with a new version, you go to his location with a
copy of the database, import the new or modified forms, reports,
queries, etc into his version and then create an mde file for him. If
so you do not need to do all that, in fact you are asking for trouble
in the long term if you do.

What you need to do is split the database into a front-end file and a
back-end file. The back-end file will hold all the tables (and
therefore the client's data) and the front-end file (which will be
linked to the tables in the back-end file) will hold the forms,
queries, reports, macros and modules. When you want to give the client
a new version all you need to do is send him a copy of the front-end
..mde file to replace the current one. In that way his data does not
get changed.

You will probably need to re-link the tables to the back-end (if the
pathname for your development system is different to his system) and
there is code to that automatically on the same Web site (under my
name). Access has a Wizard to split the database automatically for
you, it only takes a few seconds. If you need more information on
splitting the database see the help file or search this newsgroup.

I would suggest that you first investigate the Flex Grid control to
see if it will do what you want and if it does then use it and split
your database. I'm sure it will save you a lot of time.

HTH

Peter Hibbs.
 
L

Larry Kahm

Peter,

The database is split and all of my development is done in the FE. I try to
keep the BE within a couple of months of the current one.

The database uses Access' workgroup security layer, so that any form I
develop will be lost when it is imported - security has to be re-applied -
and that's the main reason I don't have the time to do any additional
customization (there's no utility to "save/restore" security).

I would normally just publish the secured MDE here and deploy (auto-relink
is included in the code) but my client is on A2000 and I am on A2003 - so I
can't build the MDE for them.

I'll take a look at the flex grid later this week.

Thanks!

Larry
 
P

Peter Hibbs

Larry,

Fair enough, sorry about jumping to the wrong conclusions. I don't
know anything about Access security so I can't advise on that. I can
see that having different versions of Access would create a few
problems. Anyway, good luck with your project.

Peter.
 

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