cuteswan
New member
- Local time
- Today, 03:49
- Joined
- Jan 11, 2008
- Messages
- 5
This is more of a "would be nice" so it's low priority, but thinking about how to do it drives me crazy anyway.
In Access 2000, I have a database of stories on-line where many have multiple parts, and the part numbers aren't necessarily contiguous. I use a query to generate raw HTML table data (so I can export it and slap into the HTML file). It would be great to include links to each part in-line with the story info. Ideally there should be only one row for each story and, if there are multiple parts, then they will be in-line with the story name and link table cell.
Story table:
Story_ID ...AutoNumber (primary key)
Title ...Text
by ...Text
RE_link ...Text
Update ...Date/Time
(There are many more fields in the real file, but I stripped them out for this example db.)
direct_links table:
{
StoryID ...Number
Part ...Number
} (primary key)
direct_link ...Text
For now I've made a query (a monster string function make_table_data) to generate table data that outputs in the following format:
<tr><td><a href="RE_link">Title</a></td><td>by</td><td>Update</td></tr>
Now I'd like to add the multiple direct_link entries to the individual output rows. I'm positive I saw code to create queries that integrate the many fields from a many-to-one table into the one row (and stupid me for not realizing it at the time). The ideal query should give me the following:
<tr><td><a href="RE_link">Title</a> <a href="direct_linkPart">(Part)</a> for each Part no.</td><td>by</td><td>Update</td></tr>
At one point I tried making a pivot table (_pivot_by_part_nos) but I finally realize that's probably not the right way to go. (Access doesn't like the code for that at all.)
Any ideas are greatly appreciated.
In Access 2000, I have a database of stories on-line where many have multiple parts, and the part numbers aren't necessarily contiguous. I use a query to generate raw HTML table data (so I can export it and slap into the HTML file). It would be great to include links to each part in-line with the story info. Ideally there should be only one row for each story and, if there are multiple parts, then they will be in-line with the story name and link table cell.
Story table:
Story_ID ...AutoNumber (primary key)
Title ...Text
by ...Text
RE_link ...Text
Update ...Date/Time
(There are many more fields in the real file, but I stripped them out for this example db.)
direct_links table:
{
StoryID ...Number
Part ...Number
} (primary key)
direct_link ...Text
For now I've made a query (a monster string function make_table_data) to generate table data that outputs in the following format:
<tr><td><a href="RE_link">Title</a></td><td>by</td><td>Update</td></tr>
Now I'd like to add the multiple direct_link entries to the individual output rows. I'm positive I saw code to create queries that integrate the many fields from a many-to-one table into the one row (and stupid me for not realizing it at the time). The ideal query should give me the following:
<tr><td><a href="RE_link">Title</a> <a href="direct_linkPart">(Part)</a> for each Part no.</td><td>by</td><td>Update</td></tr>
At one point I tried making a pivot table (_pivot_by_part_nos) but I finally realize that's probably not the right way to go. (Access doesn't like the code for that at all.)
Any ideas are greatly appreciated.