passing value to dropdown list to query

kitaeshi

Registered User.
Local time
Today, 14:08
Joined
Jun 9, 2007
Messages
30
Hi i have a drop down list which the data is taken from a table. i need to let user select from the drop down list and the list tat they chose will pass to a query to display out the data.

so how do you go about to transfer the value to the query?

tks.
 
You can do it the other way around.
In the critera row of your field in the query, add something like this:
[forms]![frmMyForm]![lstMyList]
 
wat do u mean another way?
 
Maybe a picture will help:

querycriteriafromform01.png
 
oh i got it!! but how to do u reference if the form is with a relationship?
like i have 4 member and each member can join different club and each member can join different club. relation is like many to many

sample pic below.
tks.

pic1.jpg
 
Last edited:
but how to do u reference if the form is with a relationship?
I don't understand this question. What do you mean if the form is with a relationship? If you are talking about relationships in Access that is something that ties multiple tables together. Queries, Forms, and Reports all are affected by the relationships between tables, but I'm not understanding what that has to do with the form.

like i have 4 member and each member can join different club and each member can join different club. relation is like many to many
Yes, you would have a junction table that captures that:

TABLE - tblClubMembers
ClubMemberID - Autonumber (primary key)
MemberID - Long Integer (foreign key from members table)
ClubID - Long Integer (foreign key from clubs table)

and then you would use a main form for the member information and a subform that has tblClubMembers as its recordsource. It looks like your picture shows that already.
 
Wat i trying to do is display the ppl who join cathoic aftercare. but the data is from other table which is link with a relationship with the maintable.

Just the current table i can [forms]![frmMyForm]![lstMyList] but now the table is from another table. so how do i do abt tat?

tks.
 
Dear friends,

I have attached a file with real time details in it.

I want the user to select the accession number from that drop box and then click on one of the three tabs. The results should show only the data of selected accession number.

I added the criteria for the third tab but its not working. Someone please help.

Thanks in advance.
 

Attachments

Users who are viewing this thread

Back
Top Bottom