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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Question 1

Status
Not open for further replies.

sdollen

Technical User
Oct 12, 2002
24
US
I have a question about queries that I hope someone can help with

I'm working with City/Town's of my state in a customer like capacity. We see many of the cities/towns at events and also make visits to see them.

4 tables - tblCities (info like city name, population, contact person there, also have a yes/no field if they are customers etc..) tblEvents (event info like location, date, etc...) tblEventAttendees (we list the city name, contact, and use a combobox to pull in the eventID from tblEvents..and tblContacts (we pull in info of cities we go and see using CityID from the tblCities, and list the date and who went to see them, and any info in a memo field.

Okay... now, I wanted to do a query and hope the above info is enough so someone can help

I'd like to be able to do queries on tblEventAttendees and tblContacts and compare to the tblCities and pull only those that meet the "Yes" customer criteria from tblCities.

Secondly - any suggestions to setup something for users to be able to edit tblCities to select "Yes" when a City/Town becomes a customer. I'd like something that would keep the users from opening any tables and editing the tables directly.

I know it's a lot of questions/info. I appreciate the help in advance.

Also, I'm self taught on a lot of software. I learn from playing around and forums like this. I've also bought and read through "Access97 for Dummies" but it doesn't seem to cover much more than the basics. Any suggestions of a good book to learn this type of stuff?

Thanks again!

Stefan
 
Start in query grid.
Show tblcities and set customer criteria to true.
Then show tbleventattendess and create a relationship on the key fields choosing "show all records for tblcities and only those records for tbleventattendees that equal" as the relationship type.

Then add the third table and do the same thing so that both relationship arrows are pointing away from tblcities.

This should give you want you are looking for. If you need more specific, you will have to post field names and what fields relate to eachother in the three tables.
 
kpal29 - Thanks for the reply! I setup the query as you suggested and it seemed to work. I'm now having problems receiving an "Error loading DLL" message now, so haven't been able to do anything.

BUT, thanks again! You answer made sense and seems that it will work!

Stefan
 
Go to visual basic window (by opening a form in design view and click "view Code" from the view menu)

Go to tools, references, check if there are any errors loading the libraries you have checked in here. This may be the cause of your error.

If so, you may need to reload the .dll file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top