My (final) 2 cents on continuous form design

R

rocco

Some days ago I started a thread on this forum regarding the design of a
continuous form to be used to show all of the records filled in a table and
giving the possibility to the user to select each row and perform action on
the record (mine is retrieving all of the information from the record and use
them to fill another form where the data can be edited). This can be easily
accomplished through regular continuous form but I stated few requirements:
a) the form should be unbound and the data should be not editable;
b) I hate having that crappy effect of all the text selected when you click
on a textbox to make the form pointing to the chosen record.
The table I’m using to get the data has 13 fields, but I only need 5 of them
to get the data to be displayed in the continuous form. Thus I wrote the SQL
statement to arrange the recordset that will act as recordsource for the
form. Then I made the 5 text boxes I need enabled=false and locked=true, and
this will get rid of that awful effect of having all the text selected when
you click on the control, giving the user the idea he can actually edit the
values.
I bounded these 5 controls to the relative fields from the Form.recordset.
This will give me the desired design but… will also make the “click†event
for each of the control unusable: it doesn’t fire if the control is
enabled=false.
But the “click†event is what I want to use to “select†the record, because
is the more intuitive for this purpouse. I solved by adding on ole filed to
the table and leaving it blank (thus preserving the size of the database) and
changing the SQL statement to add it. Than I added an unbound ole frame
control to the form, right at the beginning of each row (record) and bounded
to this field from the recordsource. I made the background style and border
style for this control transparent. Last I added a small Picture frame
control the same size of the OLE frame control and filled with the image of a
small magnifier glass then I positioned it behind the OLE frame control.
Done! By clicking on any control but the magnifier glass nothing happens.
When the user clicks on the magnifier glass, code in the “Click†event will
retrieve all of the data for the selected record and use them to fill another
form where they can be edit by the user.
Maybe this can be of some help to someone.

Rocco
 
D

Dirk Goldgar

rocco said:
Some days ago I started a thread on this forum regarding the design of a
continuous form to be used to show all of the records filled in a table
and
giving the possibility to the user to select each row and perform action
on
the record (mine is retrieving all of the information from the record and
use
them to fill another form where the data can be edited). This can be
easily
accomplished through regular continuous form but I stated few
requirements:
a) the form should be unbound and the data should be not editable;

Unbound? The remainder of your post seems to imply that the form is bound.
b) I hate having that crappy effect of all the text selected when you
click
on a textbox to make the form pointing to the chosen record.
The table I’m using to get the data has 13 fields, but I only need 5 of
them
to get the data to be displayed in the continuous form. Thus I wrote the
SQL
statement to arrange the recordset that will act as recordsource for the
form. Then I made the 5 text boxes I need enabled=false and locked=true,
and
this will get rid of that awful effect of having all the text selected
when
you click on the control, giving the user the idea he can actually edit
the
values.
I bounded these 5 controls to the relative fields from the Form.recordset.
This will give me the desired design but… will also make the “click†event
for each of the control unusable: it doesn’t fire if the control is
enabled=false.
But the “click†event is what I want to use to “select†the record,
because
is the more intuitive for this purpouse. I solved by adding on ole filed
to
the table and leaving it blank (thus preserving the size of the database)
and
changing the SQL statement to add it. Than I added an unbound ole frame
control to the form, right at the beginning of each row (record) and
bounded
to this field from the recordsource. I made the background style and
border
style for this control transparent. Last I added a small Picture frame
control the same size of the OLE frame control and filled with the image
of a
small magnifier glass then I positioned it behind the OLE frame control.
Done! By clicking on any control but the magnifier glass nothing happens.
When the user clicks on the magnifier glass, code in the “Click†event
will
retrieve all of the data for the selected record and use them to fill
another
form where they can be edit by the user.
Maybe this can be of some help to someone.

Why would you not use a command button for this? You could create a button
with a magnifying-glass image on the face, or you could create a transparent
command button shaped to cover all the bound controls and the whole detail
section of the form, so that when the user clicks anywhere on a record, the
command button's Click event fires.
 
B

Beetle

All of this could have been done with a lot less work. In addition
to what Dirk said, if you would have simply set the following form
properties to No -

Allow Edits
Allow Deletions
Allow Additions

- it would have prevented the users from being able to modify
any of the data on that form without having to lock/disable all
the controls, thus preventing the entire text from being selected
when you click in a text box, yet allowing the Click event to still fire.
 
D

Dirk Goldgar

Beetle said:
All of this could have been done with a lot less work. In addition
to what Dirk said, if you would have simply set the following form
properties to No -

Allow Edits
Allow Deletions
Allow Additions

- it would have prevented the users from being able to modify
any of the data on that form without having to lock/disable all
the controls, thus preventing the entire text from being selected
when you click in a text box, yet allowing the Click event to still fire.


While I would certainly do that, too, I understand that rocco doesn't want
the users to be able select the text in the controls, even without the
ability to edit it. For that feature, the controls do have to be disabled.
 
R

rocco

@Beetle: Dirk reply takes the point. Thanks anyway!
@Dirk: by having one big button control on all controls gives some
flickering on some systems. Plus you cannot have any graphic on the button
since the graphic will always be positioned in the middle, which will ruin
the overall design. And without any graphic, the user doesn't have any hint
on how to use the form. Having the magnifier glass will "suggested" the user
to click to get more, even if the user hasn't read the help file (don't they
always do?). But I can use the button without covering all the controls, you
are right!

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

Similar Threads


Top