create a form for searching information

G

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
 
G

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.
 
G

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 said:
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 said:
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
 
G

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 said:
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 said:
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top