Button to open a new form

  • Thread starter Thread starter ielmrani
  • Start date Start date
I

ielmrani

Hi all,
I have a subform with a list of contact names. I would like to add a button
next to each contact name to open another form that contains Only details of
the that contact.

Name
Button John Lerch
Button Ali Mohm
Button Barbara Kelly

If I click on button for John another form pops up with only john's info
something like this:

Name Address Phone Email
John Lerch 145 Beverly Hills xxxxxxxxxxxx Joh@XXXXXX



Thanks in advance
 
ielmrani,
Each person should have a unique "key field" identifier that differntiates that name
from all others... like EmployeeID.
Use that value to Open the detail form using the Where argument of the OpenForm method.
DoCmd.OpenForm "YourDetailForm", , , "EmployeeID = " & EmployeeID

Tip: no need to use a button on each record. Try using the double-Click of the Name
control to trigger the OpenForm. Saves space on the form, and is visually a lot less
cluttered. I usually color code these "jump" fields brick red with white font.

--
hth
Al Campagna
Candia Computer Consulting
Microsoft Access MVP - Candia, NH USA
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
I agree with Al's comments. (but use a different color combination.)

If you really really want buttons, you will have to change the
datasheet view to continuous forms and make it sort of look like a
datasheet.

But you the ability to change sort sequence and change field size.

Ron.
 
I worked. Thank you.
Al said:
ielmrani,
Each person should have a unique "key field" identifier that differntiates that name
from all others... like EmployeeID.
Use that value to Open the detail form using the Where argument of the OpenForm method.
DoCmd.OpenForm "YourDetailForm", , , "EmployeeID = " & EmployeeID

Tip: no need to use a button on each record. Try using the double-Click of the Name
control to trigger the OpenForm. Saves space on the form, and is visually a lot less
cluttered. I usually color code these "jump" fields brick red with white font.
Hi all,
I have a subform with a list of contact names. I would like to add a button
[quoted text clipped - 13 lines]
Thanks in advance
 
Back
Top