Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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
    > > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page