Condensing several fields to one and adding records

Joined
Oct 31, 2011
Messages
1
Reaction score
0
Hi,

I'm hoping this problem is just because I'm not sure how to look at it logically and therefore cannot find an elegant SQL solution and not that it's just impossible to do. Ok here it goes!

We have a database of treaties and the countries that have entered them. We also have several fields reflecting when the countries have entered and exited the treaties. A country may have several entries and exits, so there are more fields for those countries (example: USA enters the TreesGood treaty in 2003 and leaves in 2005, then they re-enter the treaty in 2007 and exits in 2010. There would be one row for this country and with values in the YearEntry1, YearExit1, YearEntry2, and YearExit2 fields). However, we want to have a single record for each country for each year it was in the treaty (so TreesGood, USA, 2003; TreesGood, USA, 2004; TreesGood, USA, 2005; TreesGood, USA, 2007; etc).

How do I go about running this in Access? I have no background in VBA so if it requires running some VBA code instead of using SQL please include some instructions on how to run the VBA code!

Thanks so much and looking forward to seeing what you guys think!
 

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