Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access 2003 Update Query Help

Posted on 2011-09-22
7
Medium Priority
?
248 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

618 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