Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    14

    Unhappy Unanswered: Help me out plz!!!

    Hi,
    I have main form and one sub form.main form contains all fields from employees table where as sub form contains all fields from department table.The two tables, employees and departments ,are related to each other through DepartmentName.What I want is that when the user select a DepartmentName from combo box in the main form It would automatically populate the sub form.Is it possible?I have tried but I am getting different errors on trials.....kindly help me.If anyfurther information u want let me know.


    Thanking U.

  2. #2
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: Help me out plz!!!

    You seem to want learning MS Access application development autodidactically, supported by a forum. I bed that you can beter buy an Introduction self-learning book.
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  3. #3
    Join Date
    Sep 2003
    Posts
    1

    Re: Help me out plz!!!

    This is what i've done...

    in the combo box's row source, type:
    SELECT DISTINCT [ComboBoxTable].[ComboBox] FROM ComboBoxTable ORDER BY [ComboBoxTable].[ComboBox];

    this alone seemed to solve the problem for me. for further help, check out the northwind database. it has a form just like this.

    erica


    Originally posted by fatim
    Hi,
    I have main form and one sub form.main form contains all fields from employees table where as sub form contains all fields from department table.The two tables, employees and departments ,are related to each other through DepartmentName.What I want is that when the user select a DepartmentName from combo box in the main form It would automatically populate the sub form.Is it possible?I have tried but I am getting different errors on trials.....kindly help me.If anyfurther information u want let me know.


    Thanking U.

  4. #4
    Join Date
    Sep 2003
    Location
    Toronto
    Posts
    1

    Arrow

    Create a form with the Dept information, say only the Department Name. Change to a combo box.

    Now create another form with the information from the Employee table, include all the information you want to see (including in the Department Name). I find it best to set this form to datasheet view.

    In the first form, using the subform wizard (follow the instructions), select the second form, match up the deptnames from first form and the second form.

    When you open the form it should filter the subform for based on the information in Deptname combo box. I believe there is a good example in the Northwind db. I learned a lot from that database.

    Good Luck

Posting Permissions

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