By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,939 Members | 611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,939 IT Pros & Developers. It's quick & easy.

how to transfer value from query1(table1) to table2?

P: 1
Hi everyone, I'm new with Access, I'M sure this can be done, (in excel it can) just can't figure it out on Access after 1 week of searching the web, please help.

What I'm trying to achieve is transfer the result of a calculated query to another table for statistics purposes.

I have a table called 'Database' which records data on people( Date in, Date out, age, etc).

I have a query called 'New Arrivals' which calculates how many people arrived today. Let assume my answer is 4.

I want to transfer the value '4' to another table called 'Statistics' in the field called New Arrivals. My goal is to be able to lookup my statistics for any given day.

How do I do this?


Mar 19 '18 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 15k+
P: 31,419
Do you want to update an existing record in [Statistics] or add a new one?
In Access there are many types of queries. Some just show data (SELECT), but there are also action queries that make changes. These can be APPEND or UPDATE queries.

When you have a clearer specification of exactly what you want/need we can probably help further.

It may help to understand that while all queries (The saved query objects in Access are called QueryDefs.) fundamentally execute SQL commands there is also the ability in Access to create a QueryDef using a QBE (Query By Example) grid. These are often easier for newbies to use. Actually, for the most part, they're easier for seasoned professionals to use. Never forget though, that under the hood, they're all just ways of holding SQL commands that can be executed.
Mar 19 '18 #2

Expert 100+
P: 1,430
As Neopa says, when you have a clear specification of what you want, things will become clearer, but my own thoughts are that you can create a very simple query on the main table (Incidentally Database is a reserved word, so I would not use that as the name of a table - something like TblPeople would be far more meaningful)

Basically you can create a query that groups the Arrivals (DateIn) and counts the number of people in that group. The basic query will give a "Spreadsheet" showing DateIn & Arrivals for all Dates. This can easily be refined to pick a specific date

Mar 19 '18 #3

Post your reply

Sign in to post your reply or Sign up for a free account.