Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

create a form for searching information

Discussion in 'Information Technology' started by Blinda, Jul 28, 2006.

  1. Blinda

    Blinda
    Expand Collapse
    Guest

    Hi all,

    I have a table include three fields (ID, VisitNum, and Oxygen). I want to
    create a form to find the Oxygen information for a specific ID and one
    specific visitnum.

    Assume my data looks like:
    ID VisitNum Oxygen
    01 1 92
    01 2 89
    01 3 90
    01 4 88
    02 1 97
    02 2 99
    03 1 95
    04 1 100
    04 2 89
    ........................

    I would like to select an ID from the IDs, then the visitnum related to the
    ID will show up for me to select, and the Oxygen data will show up in another
    box.

    That is: if I select ID 02, then only (1, 2) for me to select for the
    visitnum. and once I select 2 for the visitnum, then 99 will show up.

    Please help, thank you,

    Blinda
     
  2. Loading...


  3. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    If I understand you correctly, then create in your form two combo's and one
    text box.
    ====================
    The RowSource of the first combo will display the list of ID's
    SELECT ID
    FROM TableName
    GROUP BY ID
    ====================
    The RowSource of the second combo will display the list of VisitNum And
    Oxygen that belong to the ID selected
    SELECT VisitNum , Oxygen
    FROM TableName
    WHERE ID = Forms![FormName]![IDComboName]
    ===================
    The Text Box will display the Oxygen , In the contrl source write
    =[VisitNumComboName].Column(1)

    Note: The column count start with 0
    ===================
    I hope that what you are looking for.


    --
    Good Luck
    BS"D


    "Blinda" wrote:

    > Hi all,
    >
    > I have a table include three fields (ID, VisitNum, and Oxygen). I want to
    > create a form to find the Oxygen information for a specific ID and one
    > specific visitnum.
    >
    > Assume my data looks like:
    > ID VisitNum Oxygen
    > 01 1 92
    > 01 2 89
    > 01 3 90
    > 01 4 88
    > 02 1 97
    > 02 2 99
    > 03 1 95
    > 04 1 100
    > 04 2 89
    > .......................
    >
    > I would like to select an ID from the IDs, then the visitnum related to the
    > ID will show up for me to select, and the Oxygen data will show up in another
    > box.
    >
    > That is: if I select ID 02, then only (1, 2) for me to select for the
    > visitnum. and once I select 2 for the visitnum, then 99 will show up.
    >
    > Please help, thank you,
    >
    > Blinda
    >
     
  4. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    One more thing

    On the after update event of the first combo, you need to refresh the second
    combo
    Me.[VisitNumComboName].Requery

    --
    Good Luck
    BS"D


    "Ofer Cohen" wrote:

    > If I understand you correctly, then create in your form two combo's and one
    > text box.
    > ====================
    > The RowSource of the first combo will display the list of ID's
    > SELECT ID
    > FROM TableName
    > GROUP BY ID
    > ====================
    > The RowSource of the second combo will display the list of VisitNum And
    > Oxygen that belong to the ID selected
    > SELECT VisitNum , Oxygen
    > FROM TableName
    > WHERE ID = Forms![FormName]![IDComboName]
    > ===================
    > The Text Box will display the Oxygen , In the contrl source write
    > =[VisitNumComboName].Column(1)
    >
    > Note: The column count start with 0
    > ===================
    > I hope that what you are looking for.
    >
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "Blinda" wrote:
    >
    > > Hi all,
    > >
    > > I have a table include three fields (ID, VisitNum, and Oxygen). I want to
    > > create a form to find the Oxygen information for a specific ID and one
    > > specific visitnum.
    > >
    > > Assume my data looks like:
    > > ID VisitNum Oxygen
    > > 01 1 92
    > > 01 2 89
    > > 01 3 90
    > > 01 4 88
    > > 02 1 97
    > > 02 2 99
    > > 03 1 95
    > > 04 1 100
    > > 04 2 89
    > > .......................
    > >
    > > I would like to select an ID from the IDs, then the visitnum related to the
    > > ID will show up for me to select, and the Oxygen data will show up in another
    > > box.
    > >
    > > That is: if I select ID 02, then only (1, 2) for me to select for the
    > > visitnum. and once I select 2 for the visitnum, then 99 will show up.
    > >
    > > Please help, thank you,
    > >
    > > Blinda
    > >
     
  5. Blinda

    Blinda
    Expand Collapse
    Guest

    could please give me more specific for how to refresh the second combo. I can
    not refresh the second combo which is for the visitnum now. Thank you for
    help.

    Blinda

    "Ofer Cohen" wrote:

    > One more thing
    >
    > On the after update event of the first combo, you need to refresh the second
    > combo
    > Me.[VisitNumComboName].Requery
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "Ofer Cohen" wrote:
    >
    > > If I understand you correctly, then create in your form two combo's and one
    > > text box.
    > > ====================
    > > The RowSource of the first combo will display the list of ID's
    > > SELECT ID
    > > FROM TableName
    > > GROUP BY ID
    > > ====================
    > > The RowSource of the second combo will display the list of VisitNum And
    > > Oxygen that belong to the ID selected
    > > SELECT VisitNum , Oxygen
    > > FROM TableName
    > > WHERE ID = Forms![FormName]![IDComboName]
    > > ===================
    > > The Text Box will display the Oxygen , In the contrl source write
    > > =[VisitNumComboName].Column(1)
    > >
    > > Note: The column count start with 0
    > > ===================
    > > I hope that what you are looking for.
    > >
    > >
    > > --
    > > Good Luck
    > > BS"D
    > >
    > >
    > > "Blinda" wrote:
    > >
    > > > Hi all,
    > > >
    > > > I have a table include three fields (ID, VisitNum, and Oxygen). I want to
    > > > create a form to find the Oxygen information for a specific ID and one
    > > > specific visitnum.
    > > >
    > > > Assume my data looks like:
    > > > ID VisitNum Oxygen
    > > > 01 1 92
    > > > 01 2 89
    > > > 01 3 90
    > > > 01 4 88
    > > > 02 1 97
    > > > 02 2 99
    > > > 03 1 95
    > > > 04 1 100
    > > > 04 2 89
    > > > .......................
    > > >
    > > > I would like to select an ID from the IDs, then the visitnum related to the
    > > > ID will show up for me to select, and the Oxygen data will show up in another
    > > > box.
    > > >
    > > > That is: if I select ID 02, then only (1, 2) for me to select for the
    > > > visitnum. and once I select 2 for the visitnum, then 99 will show up.
    > > >
    > > > Please help, thank you,
    > > >
    > > > Blinda
    > > >
     

Share This Page