Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Populating one form from another (Access 2000)

    I want to have a form that has a list of employees and when you select one name and click a button it populates a second form with all the information about that employee

    Could i do this through some kind of call statement? Also would it be best to put the click on the click event of the button or the open even of the 2nd form?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Populating one form from another (Access 2000)

    You need to give us more specifics. If the employee data is already in a table, then the second form only needs to be bound to the same table and you can use a DoCmd.OpenForm and pass it a WhereCondition that points to the employeeID that was selected in the first form.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populating one form from another (Access 2000)

    Yes all the info is in a table, But how do you populate multiple text boxes in the 2nd form, meaning name, home address, department, etc

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Populating one form from another (Access 2000)

    You bind the second form to the table or query that contains the data you need. Then the individual controls on the form are bound to fields in the table or query. The only value you need to pass to the second form is the key that uniquely identifies the employee, and the form itself will do the rest.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populating one form from another (Access 2000)

    when you say bind the second form , are you referring to the record source? Also i dont know what you mean by the key?

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Populating one form from another (Access 2000)

    Why not use the forms wizard to create the second form in a rough state. Tell the wizard to use the table for the recordsource and select the layout and fields you want. That will automatically create a bound form for you and you can then see what's involved. You must have some kind of unique key that identifies a person, otherwise there would be no way to distinguish between one record and another. That's what I meant by the key. This is pretty basic stuff, so I'd say you need to do some studying on the basics of Access before you try to do much in the way of building databases.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •