Inserting New Records (1 Viewer)

darth sidious

Registered User.
Local time
Today, 08:53
Joined
Feb 28, 2013
Messages
86
I’m trying to create an append query where a new round is added to each ActID where the Round Vote is greater than or equal to 3. I know this query will only add 1 record in the form of RoundNum, RoundDate and Round Description to the bottom of the table. Please help! please look at the attached DB to see the append query and the table the data should go to.

I would also need to Append the ActID and ID for each record which is currently not in the append query as I'm struggling to find a way how to do this. Any help is greatly appreciated.


Thanks

Darth
 

Attachments

  • MusicDatabase.accdb
    832 KB · Views: 47
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:53
Joined
May 7, 2009
Messages
19,246
what will roundvotes value after adding the record?
 

darth sidious

Registered User.
Local time
Today, 08:53
Joined
Feb 28, 2013
Messages
86
Roundvotes value will be left blank as will be updated later after voting takes place.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:53
Joined
May 7, 2009
Messages
19,246
just to make sure, are you sure only one record will be added, meaning only one record will hold a roundvotes greater than 3?
 

darth sidious

Registered User.
Local time
Today, 08:53
Joined
Feb 28, 2013
Messages
86
Basically what im trying to do is add a record for all actid that have a vote of greater than or equal to 3. This will be inserted as round 3 with nothing in the votes field as later when voting takes place for round 3 i can update it after votes for round 3 take place.

Therefore all new records added for records with vites greater than or equal to 3 will have all foelds added except roundvotes to be blank
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:53
Joined
May 7, 2009
Messages
19,246
test this query, paste on SQL view:

PARAMETERS [Enter Date] DateTime, [Enter Description] Text ( 255 );
INSERT INTO RoundNumber ( ActID, RoundNum, RoundDate, RoundDescription )
SELECT RoundNumber.ActID, Max(RoundNum)+1 AS Expr1, [Enter Date] AS Expr2, [Enter Description] AS Expr3
FROM RoundNumber
WHERE (((RoundNumber.[RoundVotes])>2))
GROUP BY RoundNumber.ActID;
 

Users who are viewing this thread

Top Bottom