Link from directory to record

G

Guest

I am building a personal databse to keep track of all of my roleplaying
characters. I borrowed the phone book in the northwind sample database and am
modifying it for my purposes. I wish to be able to click on a character name
in the phone book/directory and the form to modify that character's
ingormation will open with the character loaded into the form. Any
suggestions on how to do this?

Also, I would like to dynamically change the field that the alphabet option
group filters by command buttons at the bottom. Basically, if I click on a
button that says "frist name" then when I click on the 'B' filter button the
directory will be filtered by first name. If I click on the button "last
name"... you get the picture.

Thanks,
Damon
 
A

Arvin Meyer [MVP]

Damon said:
I am building a personal databse to keep track of all of my roleplaying
characters. I borrowed the phone book in the northwind sample database and am
modifying it for my purposes. I wish to be able to click on a character name
in the phone book/directory and the form to modify that character's
ingormation will open with the character loaded into the form. Any
suggestions on how to do this?

Add the ID field to the record as an invisible text box, then use the
Double-Click event of the name text box to add a bit of code like:

DoCmd.OpenForm "YourFormName",,,"ID=" & Me.txtID
Also, I would like to dynamically change the field that the alphabet option
group filters by command buttons at the bottom. Basically, if I click on a
button that says "frist name" then when I click on the 'B' filter button the
directory will be filtered by first name. If I click on the button "last
name"... you get the picture.

You'd have to rewrite the Option Group macro as code, using an If ... Then
statement that would choose the first name from a toggle button. You could
also copy and paste the macro to a new name and just use a bit of code to
choose which macro to run.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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