Results 1 to 2 of 2
  1. #1
    joshearl is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2009
    Posts
    5

    Creating "Edit Record" link in table column

    I'm working on a database that will track, among other things, information about students enrolled in a nonprofit's afterschool programs. I'd like to have a form that shows every record in the People table, along with a few key details (name, birthdate, gender, etc.) The user could then click an "Edit Record" link to open a form with several tabbed subforms to allow them to interact with all of the data in the record.

    The Students.accdb example database that I downloaded has several examples of exactly what I want to do, but I haven't been able to figure it out so far. (See attachment.)

    Could someone post a step-by-step walkthrough of what I need to do? I have Googled extensively on this, but I think I don't know enough about Access to phrase my queries properly on this one.

    Thanks,


    Josh

  2. #2
    MAF4Fam6's Avatar
    MAF4Fam6 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Fruit Heights, Utah USA
    Posts
    140

    Post Creating "Edit Record" link in table column

    1. You want to create two forms:
    Form A: Brings up all records in Datasheet View.
    - Once form is built, open in design view again, and change the Tab Stop on the hyperlink field to No
    Form B: This is the form you want to open when you click the hyperlink in your first form.

    2. Create a Macro to run the following Actions/Arguments in the following order:
    GoToControl ------Move the Focus to another field name on Form A; does not matter which field with exception of hyperlink field.
    OpenForm---------Opens the second form. Where Condition is used to open the same record in Form B that relates to record in Form A.

    The following image is provided as an example of the Macro:

    Attachment 471

    You will notice in the above Macro's second Action line (OpenForm), the Form Name is the name of Form B.
    Below the Form Name, is the Where Condition which is most important. The first field name (lngProductID) you come across in the Where Condition is the field name from Form A which holds the primary key in the underlying Table or Query (record source). The next part of the expression says to match the Form A's Primary Key from the active record to Form B's lngProductID field name which is also set to the Primary Key. i.e. If you click a record in Form A that contains a member's Social Security Number of let's say 123-45-6789, then have the Macro open Form B to display only the record containing the same record of the member with the 123-45-6789 Social Security Number.

    3. Finally, you want to edit FORM A in design view. Then open the properties of your hyperlink field and find the Event called On Got Focus and insert the name of the Macro you created.

    RC

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 06-14-2010, 02:31 PM
  2. Replies: 0
    Last Post: 11-03-2009, 11:42 AM
  3. Replies: 21
    Last Post: 06-03-2009, 05:54 PM
  4. Error "Record is Deleted"
    By koper in forum Access
    Replies: 8
    Last Post: 03-10-2009, 10:20 AM
  5. Link tables on "special" fields
    By Gargen in forum Access
    Replies: 0
    Last Post: 12-18-2008, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums