your 2 cents on this form design

R

rocco

Hello,
I’m in the process of designing a form to be used to show the list of
records collected in a table. It is basically a continuous form, but its
record source is a SQL statement with just FEW of the fields of the original
table, and the data are not editable; the form acts just as a sort of
archive. At the beginning at each row in the form there is an icon - a small
magnifying glass – by clicking on which another form will pop up, showing ALL
of the data collected in the table for a well identified record and the user
can also edit them. The normal functioning would not allow me to link the
small icon to each row (record), thus I kind of fake it by having a text box
and making it as small as the picture frame and arranging it on top of the
picture frame. Then I made the textbox background transparent and no border
and changed the SQL statement to have another field from the table, the
primary key, and bounding the textbox to this field. Now by clicking on any
small icon I actually click on the textbox and I wrote code for the OnClick
event to use its value to retrieve a precise set of the data to be used to
fill the form that will pop. Obviously there is the problem that I cannot
hide the content of the textbox and this will ruin the design of the small
magnifying glass, resulting in some ugly symbol. I overcome this problem by
changing, once again, the SQL statement and concatenating 10 spaces before
the field value. This will make the text that fill the textbox “invisibleâ€
(it is out of the range of its width). I will then use the TRIM function to
get rid of the blanks before using the value in the code. I will have your
guessing to have the same feature but maybe with a more clean design.
Thanks!
Rocco
 
M

Michael Conroy

Rocco,
What you may not realize is that clicking on a row of data while in a
continous form means that you are on that row as far as the table is
concerned and all information related to that record is available to you,
even if the form is only displaying a few fields.

With that in mind, when the user clicks on the mag icon, the primary key is
available to you. In the on click event, you need some code like my example
below.

Criteria = "([RegionID] = " & Me.RegionID & ")"
DoCmd.OpenForm "frmRegionsDetail", acNormal, , Criteria

So if the user clicks on record five, this will grab the primary key number,
say 78, and open the detail form with only that one record.

Hope this helps
 
R

rocco

Actually it wont work. The icon is unbound, thus whichever you click, on
which record you like, will always refer to the data in the first record. Ie
if you code to get the primary key and you click the icon for the fifth
recorc, you get the data of the first record of the dataset.
Rocco

Michael Conroy said:
Rocco,
What you may not realize is that clicking on a row of data while in a
continous form means that you are on that row as far as the table is
concerned and all information related to that record is available to you,
even if the form is only displaying a few fields.

With that in mind, when the user clicks on the mag icon, the primary key is
available to you. In the on click event, you need some code like my example
below.

Criteria = "([RegionID] = " & Me.RegionID & ")"
DoCmd.OpenForm "frmRegionsDetail", acNormal, , Criteria

So if the user clicks on record five, this will grab the primary key number,
say 78, and open the detail form with only that one record.

Hope this helps
--
Michael Conroy
Stamford, CT


rocco said:
Hello,
I’m in the process of designing a form to be used to show the list of
records collected in a table. It is basically a continuous form, but its
record source is a SQL statement with just FEW of the fields of the original
table, and the data are not editable; the form acts just as a sort of
archive. At the beginning at each row in the form there is an icon - a small
magnifying glass – by clicking on which another form will pop up, showing ALL
of the data collected in the table for a well identified record and the user
can also edit them. The normal functioning would not allow me to link the
small icon to each row (record), thus I kind of fake it by having a text box
and making it as small as the picture frame and arranging it on top of the
picture frame. Then I made the textbox background transparent and no border
and changed the SQL statement to have another field from the table, the
primary key, and bounding the textbox to this field. Now by clicking on any
small icon I actually click on the textbox and I wrote code for the OnClick
event to use its value to retrieve a precise set of the data to be used to
fill the form that will pop. Obviously there is the problem that I cannot
hide the content of the textbox and this will ruin the design of the small
magnifying glass, resulting in some ugly symbol. I overcome this problem by
changing, once again, the SQL statement and concatenating 10 spaces before
the field value. This will make the text that fill the textbox “invisibleâ€
(it is out of the range of its width). I will then use the TRIM function to
get rid of the blanks before using the value in the code. I will have your
guessing to have the same feature but maybe with a more clean design.
Thanks!
Rocco
 
M

Michael Conroy

Rocco,
I guess I made an assumption that the user is first clicking on one of the
fields before clicking on the icon. Let me give you two design considerations.

1) Get rid of the icon and use the double click event on all the displayed
fields. The first click puts the pointer on that record and the second opens
the detail form. This actually gives you some great options. As an example,
with my data, I have airport and plane information on the same continuous
form, so if a user double clicks on the tail number of an airplane, they get
the detail for that plane. If they double click on the station code, like
JFK, they get the detail about that airport.

2) Move the icon to the form footer. This forces the user to click on a
record, thus giving you the primary key, then clicking on the mag icon to
open the detail form. It also frees up some space and you don't see so many
icons in the detail section.

Personally, I use the first option because double clicking is like linking
on a web page, you are "drilling" down into the data.

That's my two cents worth anyway. Good luck.
--
Michael Conroy
Stamford, CT


rocco said:
Actually it wont work. The icon is unbound, thus whichever you click, on
which record you like, will always refer to the data in the first record. Ie
if you code to get the primary key and you click the icon for the fifth
recorc, you get the data of the first record of the dataset.
Rocco

Michael Conroy said:
Rocco,
What you may not realize is that clicking on a row of data while in a
continous form means that you are on that row as far as the table is
concerned and all information related to that record is available to you,
even if the form is only displaying a few fields.

With that in mind, when the user clicks on the mag icon, the primary key is
available to you. In the on click event, you need some code like my example
below.

Criteria = "([RegionID] = " & Me.RegionID & ")"
DoCmd.OpenForm "frmRegionsDetail", acNormal, , Criteria

So if the user clicks on record five, this will grab the primary key number,
say 78, and open the detail form with only that one record.

Hope this helps
--
Michael Conroy
Stamford, CT


rocco said:
Hello,
I’m in the process of designing a form to be used to show the list of
records collected in a table. It is basically a continuous form, but its
record source is a SQL statement with just FEW of the fields of the original
table, and the data are not editable; the form acts just as a sort of
archive. At the beginning at each row in the form there is an icon - a small
magnifying glass – by clicking on which another form will pop up, showing ALL
of the data collected in the table for a well identified record and the user
can also edit them. The normal functioning would not allow me to link the
small icon to each row (record), thus I kind of fake it by having a text box
and making it as small as the picture frame and arranging it on top of the
picture frame. Then I made the textbox background transparent and no border
and changed the SQL statement to have another field from the table, the
primary key, and bounding the textbox to this field. Now by clicking on any
small icon I actually click on the textbox and I wrote code for the OnClick
event to use its value to retrieve a precise set of the data to be used to
fill the form that will pop. Obviously there is the problem that I cannot
hide the content of the textbox and this will ruin the design of the small
magnifying glass, resulting in some ugly symbol. I overcome this problem by
changing, once again, the SQL statement and concatenating 10 spaces before
the field value. This will make the text that fill the textbox “invisibleâ€
(it is out of the range of its width). I will then use the TRIM function to
get rid of the blanks before using the value in the code. I will have your
guessing to have the same feature but maybe with a more clean design.
Thanks!
Rocco
 

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