Thanks Duane, worked great!
Troy
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Duane
Hookom
Sent: Wednesday, December 26, 2012 4:46 PM
To: Access Professionals Yahoo Group
Subject: RE: [MS_AccessPros] Update query to set a MAX value
You typically can't create an updateable query that contains an
aggregate like Max(). You could use DMax() like:
UPDATE [Table 2] SET Job_Number = DMax("Job_Number","[Table 1]");
Duane Hookom MVP
MS Access
----------------------------------------
> From: tsherven@mcd.net <mailto:tsherven%40mcd.net>
> Hi,
>
> I'm using Access 2010 and am trying to write an update query, but am
> struggling. The source table (Table 1) has many records ordered by job
> number. The destination table (Table 2) has 1 record with a field
> called Job_Number. Every day, I want to capture the highest job number
> and store it in Table 2. Is this possible through an update query? I
> seem to be struggling with the concept of using MAX(Table1.jobno) in
an
> update query. Any advice?
>
> Thanks,
> Troy Sherven
>
> MCD, Inc.
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar