View Single Post
  #6  
Old March 25th, 2009, 08:14 PM posted to microsoft.public.access.tablesdbdesign
Steve[_70_]
external usenet poster
 
Posts: 152
Default How to call up Forms from Datasheets

Hello Aeneas,

You need two forms. The first is a continuous form where you display a list
of all the records. If there are many fields in each record, display only
enough fields that will allow you to visually distinguish one record from
another. Be sure the primary key is included in the selected fields. The
second form is a single form that displays all the fields in a record. Now
what you want to be able to do is open the first form, click on a record in
the list and open the second form displaying the full record which you
clicked in the first form. To do this, put the following code in the Click
event of one or more fields in the first form:
Docmd.OpenForm "NameOfSecondForm",,"[NameOfPrimaryKey] = " &
Me![NameOfPrimaryKey]

Steve






"Aeneas" wrote in message
...
Thanks for going to the trouble to reply. For my purposes I need 1) to
look
at my data in datasheet view and 2) to refer to the form view (single
page)
in order to consult notes (in memo form) that I make on particular
records.
I realise that I can have numerous forms but in my case generally I need
only
one - the main purpose of which is to store my notes. What I need to get
to
is a situation where I can move easily between the datasheet and the form.
I
now know from the Northwind 2007 sample database that it is possible to
do
it in Access at the click of my mouse on the datasheet view. I just don't
know how to design the connection. I suppose what I am really asking is
how
do I design my datasheet to provide the facility that I have found in the
Northwind Customer List.

"Fred" wrote:

Hello Aeneas,

First, clarifying terminology, forms are just windows to data. You can
design 100 different forms to look at the same data, so there is no such
thing a A (singular) form for a record.

Second, 99.9% of the time, tables are not the way to look at data. I
say
that forms and queries are, other people say that only forms are.

Next I'm assuming that the form that you want to view the record in is a
"one page per record" type form. (There are other tyeps, such as ones
that
look like the table view, with a different record in each line.

The short answer is to not even use the table view. There are a zillion
ways to do what you want to do, half of them fall under the following:
open
the form that you want to use, and then bring up the desired record in
that
form. One of them is to click on the field (ANY field) that you want to
locate by, hit the binoculars, and then punching in your criteria.

While this involves searching for the record, in your described situation
you are already doing that anyway, now you just have to use one "screen"