Solved

Access 2003 Update Query Help

Posted on 2011-09-22
7
231 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
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!

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

685 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