Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preparing a survey with 2 distinct characteristics 1

Status
Not open for further replies.

Mgoo

Programmer
May 16, 2007
15
CA
Hey, first post here, and I'm new to access

I'm trying to set up a form regarding survey completed by different cities.

Relationships:
Survey's have one to many to questions (linked by surveyID)

Survey and Cities are linked through SurveyLink that has SurveyID, CitiesID, SurveyLinkID.


What I have now is a form that has 2 combo boxes that allows the user to select a Survey and a City. I am able to get SurveyID and CitiesID from their selection.

Now what I am struggling at is trying to find the SurveyLinkID that has the same SurveyID and CitiesID that the user selected.

Example
If SurveyLink.SurveyID == SurveyID && SurveyLink.CitiesID = CitiesID then
'That particular SurveyLink has the proper SurveyLinkID

I am guessing it would have to be in SQL. Anyone know how I would write this?

Thanks for the help!

Mgoo
 

How about...
Code:
dlookup("SurveyLinkID", "SurveyLink", "SurveyID = " & [i]SurveyIDComboBox[/i] & " and CityID = " & [i]CityIDComboBox[/i])


Randy
 
oh ho! works perfect. thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top