Solved

Access 2003 Update Query Help

Posted on 2011-09-22
7
203 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
  • 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now