Sign Up |  Live StatsLive Stats    Articles 34,874| Comments 154,820| Members 17,226, Newest gurjeetgill| Online 327
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

 
 
  
  

Move records

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 25 USD (6%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
Himachal Pradesh to seek records before entering 'Sikh' word in Revenue records (New Sikh News Reporter Sikh News 0 19-Feb-2009 17:00 PM
Deleting half completed records and copying records questions wazza_c12@hotmail.com Information Technology 2 28-Jul-2006 08:32 AM
Move records between table with button Hassan Merzha Information Technology 1 28-Jul-2006 08:28 AM
Lookup Field to be used to open records and create records... jejesmith52 Information Technology 0 28-Jul-2006 08:17 AM
Filtering records in a query based on field values in adjacent records sdisalvo Information Technology 2 28-Jul-2006 08:12 AM


Tags
move, records
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:21 AM
pjy's Avatar pjy
Guest
 
Posts: n/a
   
   
Move records

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I wonder if anyone can help...I have a form which displays records of
services to a specific user. occasionally 1 or more of these services\records
needs to be removed..is there any way I can move these records to another
table as I need to then print the records I have removed. I would need to use
the form to display and remove the records via a button if that's
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/11550-move-records.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11550
possible..thanks for your help...

pat

*








 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:21 AM
Allen Browne's Avatar Allen Browne
Guest
 
Posts: n/a
   
   
Re: Move records

To move them to another table, you need to execute 2 action queries:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11550
- an INSERT to add them to the other table, and
- a DELETE to remove them from the current table.

To get an all-or-nothing result, you will want to wrap these 2 operations in
a transaction. Details in:
Archive: Move records to another table
at:
http://allenbrowne.com/ser-37.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11550
Reply to group, rather than allenbrowne at mvps dot org.

"pjy" wrote in message
news:99CB3784-C9BC-439C-8706-023A3D7F6977@microsoft.com...
>I wonder if anyone can help...I have a form which displays records of
> services to a specific user. occasionally 1 or more of these
> services\records
> needs to be removed..is there any way I can move these records to another
> table as I need to then print the records I have removed. I would need to
> use
> the form to display and remove the records via a button if that's
> possible..thanks for your help...
>
> pat



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:21 AM
pjy's Avatar pjy
Guest
 
Posts: n/a
   
   
Re: Move records

Hi Allen cheers for that...but it looks far to complicated for what I'm
trying to do...A user has 10 services against their ID. one of these services
is no longer required i want to move the record in focus to another table (so
that it does not exist in table that provides data for viewed form) and then
print a specific form with this record on it based on the date and user it
was deleted\moved from. I hope this explains better what i'm trying to do and
hopefully it's easier to do than the transaction thing.

Cheers

"Allen Browne" wrote:

> To move them to another table, you need to execute 2 action queries:
> - an INSERT to add them to the other table, and
> - a DELETE to remove them from the current table.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11550
>
> To get an all-or-nothing result, you will want to wrap these 2 operations in
> a transaction. Details in:
> Archive: Move records to another table
> at:
> http://allenbrowne.com/ser-37.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11550
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "pjy" wrote in message
> news:99CB3784-C9BC-439C-8706-023A3D7F6977@microsoft.com...
> >I wonder if anyone can help...I have a form which displays records of
> > services to a specific user. occasionally 1 or more of these
> > services\records
> > needs to be removed..is there any way I can move these records to another
> > table as I need to then print the records I have removed. I would need to
> > use
> > the form to display and remove the records via a button if that's
> > possible..thanks for your help...
> >
> > pat

>
>
>

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:21 AM
Allen Browne's Avatar Allen Browne
Guest
 
Posts: n/a
   
   
Re: Move records

  Donate Today!  
You can do it without the transaction.

The basic code is just this:
Dim db As DAO.Database
Dim strSql As String

strSql = "INSERT INTO ...
db.Execute strSql, dbFailOnError
strSql = "DELETE FROM ...
db.Execute strSql, dbFailOnError

The specifics are handled by getting the SQL statements right. To do that,
create a query using any specific value as criteria, change it to an Append
query (Append on Query menu), and then switch to SQL View (View menu) to see
an example of what you need to create.

In the same way, mock up your Delete query to get the string you need for
that also.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"pjy" wrote in message
news0AA4E49-E818-468C-8563-8523696244AD@microsoft.com...
> Hi Allen cheers for that...but it looks far to complicated for what I'm
> trying to do...A user has 10 services against their ID. one of these
> services
> is no longer required i want to move the record in focus to another table
> (so
> that it does not exist in table that provides data for viewed form) and
> then
> print a specific form with this record on it based on the date and user it
> was deleted\moved from. I hope this explains better what i'm trying to do
> and
> hopefully it's easier to do than the transaction thing.
>
> Cheers
>
> "Allen Browne" wrote:
>
>> To move them to another table, you need to execute 2 action queries:
>> - an INSERT to add them to the other table, and
>> - a DELETE to remove them from the current table.
>>
>> To get an all-or-nothing result, you will want to wrap these 2 operations
>> in
>> a transaction. Details in:
>> Archive: Move records to another table
>> at:
>> http://allenbrowne.com/ser-37.html
>>
>> "pjy" wrote in message
>> news:99CB3784-C9BC-439C-8706-023A3D7F6977@microsoft.com...
>> >I wonder if anyone can help...I have a form which displays records of
>> > services to a specific user. occasionally 1 or more of these
>> > services\records
>> > needs to be removed..is there any way I can move these records to
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11550
>> > another
>> > table as I need to then print the records I have removed. I would need
>> > to
>> > use
>> > the form to display and remove the records via a button if that's
>> > possible..thanks for your help...

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11550


Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Recent Discussions
sikhism Benti Chaupai - Keertan...
Today 19:55 PM
8 Replies, 171 Views
sikhism A village where every...
Today 19:12 PM
0 Replies, 9 Views
Why have Sikhs Changed...
Today 18:12 PM
34 Replies, 1,148 Views
Fools Who Wrangle Over...
Today 17:38 PM
910 Replies, 77,770 Views
Turban Cloth
Today 17:22 PM
3 Replies, 57 Views
Is Hindu/Sikh a Valid...
Today 16:40 PM
79 Replies, 1,376 Views
Scientists cure cancer,...
By Kamala
Today 14:09 PM
7 Replies, 118 Views
Any Japji Sahib videos...
By Kamala
Today 13:02 PM
6 Replies, 62 Views
SGPC Recruitment Scandal
Today 04:09 AM
0 Replies, 48 Views
Sukhmani Sahib Astpadi 8...
Today 01:43 AM
0 Replies, 43 Views
Why Nathuram Godse...
Today 01:23 AM
3 Replies, 189 Views
Are Nihangs: A Legacy...
Yesterday 23:30 PM
11 Replies, 233 Views
Sukhmani Sahib: 10th...
Yesterday 22:27 PM
0 Replies, 54 Views
Zafarnama..
Yesterday 21:33 PM
0 Replies, 94 Views
Sukhmani Sahib Astpadi 8...
Yesterday 20:37 PM
1 Replies, 67 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 20:30 PM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.38188 seconds with 30 queries