?
Solved

Access 2003 Update Query Help

Posted on 2011-09-22
7
Medium Priority
?
243 Views
Last Modified: 2012-05-12
I have table1 with
RegistrationDate
Name
Address

I have Table2 with
RecentRegistration
Last Updated

Can someone help me with the query to update Table2 with MAX(RegistrationDate), Now()

0
Comment
Question by:OnsiteSupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 20

Expert Comment

by:clarkscott
ID: 36580854
Not sure exactly what you want.
Do you want to update all records in Table2 at once...
or
Update Table2 individually (when it's time to update)
?

Scott C
0
 
LVL 20

Expert Comment

by:clarkscott
ID: 36580878
Also, is there a reference field in table2 related to table1?  (relationship)?

Scott C
0
 

Author Comment

by:OnsiteSupport
ID: 36580903
Scott - next time, can you do better than 7 seconds to respond to my posting? :)

here is more on what i'm trying to do:

Users import an Excel file into Access on a daily basis.  I want to show stats on the main form that displays the last time the file was imported as well as the most recent order date.

So, I have tblOrders that is filled with orders including OrderDate and want to show when was the last order processed.

hope that makes sense.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 20

Expert Comment

by:clarkscott
ID: 36581022
Still fuzzy...
When you import from Excel- do you APPEND this data to an existing table in Access?
If so, you can create a field in the table with DEFAULT VALUE = DATE().  As each record is imported, this 'date' field will display the date it occurred.

In order to prevent a ton of questions and answers, can you attach your tables and let me review?

Scott C

0
 

Accepted Solution

by:
OnsiteSupport earned 0 total points
ID: 36581086
Scott-
Made some progress.  I've used DMax to get the MAX value of Register_Date from my order table.

UPDATE tblStats SET tblStats.RecentRegistration = DMax("Register_Date","tblImportedRegistrations"), tblStats.LastImported = Now();

I've updated the tblStats table with the correct values.  Now I want to display the two values on my switchboard form.

Thanks...sorry to be confusing.


0
 

Author Comment

by:OnsiteSupport
ID: 36581101
Got it with DLookup.

Thanks anyway :)
0
 

Author Closing Comment

by:OnsiteSupport
ID: 36708093
I figured it out myself (for once)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question