Adding Command Button Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to be pointed in the right direction on this one. I would like to have
a form that will list a series of records. Next to each record I would like
to ass a command button that will open up that record in a new form that
allows for editing the record. I can easily build the forms I need but no
nothing about setting up the command button. Any ideas or source material you
can point me to. Thank you very much Jason
 
Jason said:
I need to be pointed in the right direction on this one. I would like to
have
a form that will list a series of records. Next to each record I would
like
to ass a command button that will open up that record in a new form that
allows for editing the record. I can easily build the forms I need but no
nothing about setting up the command button. Any ideas or source material
you
can point me to. Thank you very much Jason

From your description, you will have a continuous forms veiw Form. This is
often used in Databases with a modest number of Records as an approach to
selecting detail Forms for a specific Record. When I use it, I trigger the
opening of the detail Form with the DoubleClick event (on any of the
Controls shown for the Record, or for the background area of that line), but
the Command Button you describe will work just fine (and the Command Button
wizard will write the basic code for you).

Assuming you have displayed on your ContinuousForm the Field that uniquely
identifies the Record (just for illustration, let's call that UniqueID,
displayed in a TextBox txtUniqueID.

The Command Button wizard will allow you to specify the Form to be opened,
and will allow you to specify that you want to open to a specific Record,
and will prompt you for which Fields it is to match to do so.

Larry Linson
Microsoft Access MVP
 
If you have the form in datasheet mode instead of continuous you can
use the dbl-click event (but not the button approach)

In continuous mode or single mode then both approaches will work as
Larry described.

Ron
 
Back
Top