Solved

Access 2003 Update Query Help

Posted on 2011-09-22
7
236 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
My Do While is Not Producing Anything 15 85
How to get data off Lotus Notes server 4 67
Intermittent OleDbConnection Error 20 51
SUBFORM on ACCESS 2013 8 30
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
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.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

737 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