Update or Append Query

SteveF

Registered User.
Local time
Today, 07:52
Joined
Jul 13, 2008
Messages
218
I have a table, and all I want to do is take the number from one field and insert it into the other.

My table simply has 'opening' and 'closing', they are dates, and I want the figure from 'closing' pushed across to become 'opening', I then insert a fresh date via a form into the 'closing' field and off we go again, but I'm struggling to make the query work and I can't understand why.

I thought that an append query would work with "0" for the 'closing' field but it doesn't, any ideas anyone?
 
Hi -

An Append Query adds records while an Update Query makes changes to existing data.

Try your current efforts using an Update Query. If you still have problems, please post back -- including your query SQL.

Best Wishes - Bob
 
I'm struggling because the update query doesn't seem to want to update the table from within itself. I usually find a way round these things but this has me stumped....
 
Try something like this:
Code:
Update MyTable
Set 
opening = MyTable.closing,
closing = Null;
 
More genius! That was the last piece of the puzzle, it's forms and fluff now and we are ready for real testing.

Thanks for input.
 

Users who are viewing this thread

Back
Top Bottom