Results 1 to 9 of 9
  1. #1
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11

    Form within a Form

    Hi All,



    I am very new to Access and am trying to build a database for recruiting. I have completed a lot of the database but am stuck with a few issues.

    I have a main data input form that has an evaluation from that opens from there. The problem is that I cant figure out how to make the records match.

    I.e if I select Suzie Smith on the Main data Form, when I click the Evaluation Form I want it to automatically go to whichever record I have selected on the Main data form.

    If anyone could help me i would be very happy

    Thanks

    Andy

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Include a WHERE condition in your OpenForm command.

  3. #3
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    sorry if this is a dumb question but I am just using a macro to open the form - I have never used vb or any other programming language - is there any way to do it without using vb ?

    thanks

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What version of Access are you using?

  5. #5
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    I am using Access 2003 but we have Access 2007 as well. I would prefer to use 2003....

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In the lower section of th4e design view of a macro is the WHERE Condition area. Does your RecordSource query/table have a unique field for Suzie Smith? If so then in the Where Condition area put [TheFieldName] = " & Me.ControlName that has the value in it from this form (if it is numeric. If text then:
    [TheFieldName] = '" & Me.ControlName & "'"

  7. #7
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    Ok in terms of unique field you mean record number? I have an ID number in the field ID # - so for instance Suzie Smith is 2413. However, if Mandy Moore is selected - ID #1639 I need the same thing to happen.

    I guess what I need is for all forms to recognize which record is selected in the Main data Form and open to that same record.

    Thanks

    Andy

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Then your WHERE condition is simply:
    "[ID] = " & Me.[ID]
    ...using *your* control and field names of course.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Andy,
    If you are still having problems then maybe you can post your zipped up db on one of the free file hosting sites. BTW, it is not a good idea to have embedded spaces in a name or use the "#" character either. Just thought you'd like to know. Remove any sensitive data if you post the db.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-25-2013, 10:56 AM
  2. Replies: 0
    Last Post: 11-10-2008, 12:32 PM
  3. Link unbound form to bound form
    By Papote in forum Forms
    Replies: 0
    Last Post: 09-25-2008, 07:42 PM
  4. Updating SQL server form Access form?
    By slash75 in forum Forms
    Replies: 1
    Last Post: 09-06-2008, 02:39 PM
  5. In a field on a Form, on click open another form
    By jackieagra in forum Programming
    Replies: 1
    Last Post: 03-20-2008, 09:44 AM

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