Building a temporary table using records in two different tables.

LadyMarmalade

Registered User.
Local time
Today, 10:01
Joined
Sep 23, 2014
Messages
26
Hi there;
I'm making a library database program thing...
There's an option for the user to view all books on loan.

I have two tables:
Books, which has columns ID*, ISBN, Author, Title, Year, Location
BorrowerStorage, which has columns Book ID, Name, Email Address, Desk Number

Book ID in BorrowerStorage is related to the Books primary key.

Now, for the viewing all books on loan, I want it to produce a read only table which contains all the entries from the BorrowerStorage table and the corresponding Title/Author columns (i.e. the records for which the ID in Books column = BookID in Borrower Storage column)...

How do I go about doing this? Any suggestions?
I've been using VBA so far and would like to continue via that so if that's possible, that would make life a lot easier...If not, just shout me down.
Thanks!
 
Do you have a good reason for thatg temporary table? Otherwise you just need a query to get the desired info from both tables. Do a tutorial on queries - 1 hour and you'll be much wiser.
 
Queries D: I havn't looked a at an access Query for three years. Getting back in the swing of all this is tiresome.
Right, time to do some learnifying!
Thanks. I'll come back here when I eventually get stuck :P
 
Do you have a good reason for thatg temporary table? Otherwise you just need a query to get the desired info from both tables. Do a tutorial on queries - 1 hour and you'll be much wiser.

Okay, right, hadn't realized that SQL = queries

Now, thing is, I can generate the queries that I need, kind of; there are two hurdles however:
A) When looking at the Books database, my WHERE ID = statement will need to obviously vary, with the value being taken from the BorrowerStorage database (i.e. it will look at each record, find BookID, go to the books database). How can I do this? Access doesn't have record numbers - it'd be really easy if I could just loop through every record on the BorrowerStorage database and append records one by one. I'm thinking too much in terms of Excel VBA >.>

B) When the above is solved and I manage to get a bunch of record sets - likely one record set with the book IDs, one with the author/title of the book and one with all the borrower details - how do I append them on a columnular basis? D:

Sorry, these are probably quite simple...
 
You still need to do a tutorial on queries. Once that is done, go into the query designer of Access and play - then the answers will become obvious. You want to write a story in Tagalog but do not yet speak a word of Tagalog - the sequence is to learn a few words first.
 
You still need to do a tutorial on queries. Once that is done, go into the query designer of Access and play - then the answers will become obvious. You want to write a story in Tagalog but do not yet speak a word of Tagalog - the sequence is to learn a few words first.

I admit I was getting a bit irritated with you but I did as you said kind of. Went to query mode and solved my own problem in literally about a minute and a half and I feel like an idiot for trying to over complicate it using VBA :banghead:
Thanks!
 

Users who are viewing this thread

Back
Top Bottom