Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / May 2005

Tip: Looking for answers? Try searching our database.

Creating a list of mailouts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy - 25 May 2005 17:11 GMT
Hello.

I have two tables called Mailouts and Customers. I have a lookup table
between them containing foreign keys from both tables. What I'd like to do is
do a search for customers by certain criteria, then create a new mailing
where it would create a new Mailout_ID, and then it would create new rows,
each with that Mailout_ID plus all the Customer_IDs that were returned in the
search.

Would this require a macro? I'm not really sure.

Thanks
Andrew
Pringle9984 - 28 May 2005 17:39 GMT
You best approach would be to use a query

Lets say your 'customers' table is something like

CustomerID | CustomerName | CustomerAddress | LikesBooks | LikesFilm
| LikesIcecrea

You want to select the name and address of everyone who likes film
(which is indicated by a tick box in he 'LikesFilms' field, the SQ
query to select all this would be

SELECT CustomerName, CustomerAddress FROM Customers WHERE LikesFilms
Ye

That's the most basic type of select query, it would list the name an
address of every customer who meets the criteria

You can expand on the criteria... maybe

SELECT CustomerName, CustomerAddress FROM Customers WHERE LikesFilms
Yes AND LikesBooks = Yes AND LikesIcecream = N

That'd just select the customers who met all three criteria (though
doubt there'll be many who don't like ice cream) - you can also us
OR in the same way

WHERE LikesFilms = Yes OR LikesBooks = Ye

And so forth..

There's a few different approaches to inserting a new row but m
personal choice is to use SQL again, it will depend on the structur
of your table and where you're getting the data from but a search fo
SQL INSERT on Google should give you a good starting point
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.