PC Review


Reply
 
 
How do you clear a report of data after
Guest
Posts: n/a
 
      27th Apr 2009
I would like to append one row at a time i.e. the view I have on my form is
the one I would like to append with appending the whole table plus I would
like to do this via a command button is this possible.

Thank you
George
 
Reply With Quote
 
 
 
 
Armen Stein
Guest
Posts: n/a
 
      28th Apr 2009
On Mon, 27 Apr 2009 06:45:01 -0700, How do you clear a report of data
after <(E-Mail Removed)>
wrote:

>I would like to append one row at a time i.e. the view I have on my form is
>the one I would like to append with appending the whole table plus I would
>like to do this via a command button is this possible.


Hi George,

Your question doesn't seem clear to me. Can you try rewording it to
describe exactly what you want to do? Maybe with an example?

Armen Stein
Microsoft Access MVP
www.JStreetTech.com

 
Reply With Quote
 
How do you clear a report of data after
Guest
Posts: n/a
 
      28th Apr 2009
Hi Armen
Sorry if I seem abit unclear, What I would like to do is create a archive
table but instead of archiving all of the table I would like to archive just
the record I 'am viewing in the form view via a command button reason being
the record on view has tasks to compelete and when completed I would like to
archive that record.
Thank you for your time.

"Armen Stein" wrote:

> On Mon, 27 Apr 2009 06:45:01 -0700, How do you clear a report of data
> after <(E-Mail Removed)>
> wrote:
>
> >I would like to append one row at a time i.e. the view I have on my form is
> >the one I would like to append with appending the whole table plus I would
> >like to do this via a command button is this possible.

>
> Hi George,
>
> Your question doesn't seem clear to me. Can you try rewording it to
> describe exactly what you want to do? Maybe with an example?
>
> Armen Stein
> Microsoft Access MVP
> www.JStreetTech.com
>
>

 
Reply With Quote
 
Armen Stein
Guest
Posts: n/a
 
      28th Apr 2009
On Tue, 28 Apr 2009 07:07:01 -0700, How do you clear a report of data
after <(E-Mail Removed)>
wrote:

>Hi Armen
>Sorry if I seem abit unclear, What I would like to do is create a archive
>table but instead of archiving all of the table I would like to archive just
>the record I 'am viewing in the form view via a command button reason being
>the record on view has tasks to compelete and when completed I would like to
>archive that record.
>Thank you for your time.


Okay, that's clearer.

First, unless you have hundreds of thousands of records, there's no
need to archive to another table. Most developers would just set a
flag in the record to indicate that it's complete. Then you can have
your queries, forms and reports omit the completed records, unless you
want to see them in history. That's much easier and better-structured
than moving them to another table.

But if you really *must* archive them to another table, you can write
a bit of VBA behind your command button to run an Append query to your
archive table, specifying the primary key from the current record in
the criteria. Then you can delete the current record. This all
assumes you don't have any child records under this record.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com

 
Reply With Quote
 
How do you clear a report of data after
Guest
Posts: n/a
 
      28th Apr 2009
I forgot to mention I'am new Access what do you mean by setting a flag in a
record and hwo would you do this

"Armen Stein" wrote:

> On Tue, 28 Apr 2009 07:07:01 -0700, How do you clear a report of data
> after <(E-Mail Removed)>
> wrote:
>
> >Hi Armen
> >Sorry if I seem abit unclear, What I would like to do is create a archive
> >table but instead of archiving all of the table I would like to archive just
> >the record I 'am viewing in the form view via a command button reason being
> >the record on view has tasks to compelete and when completed I would like to
> >archive that record.
> >Thank you for your time.

>
> Okay, that's clearer.
>
> First, unless you have hundreds of thousands of records, there's no
> need to archive to another table. Most developers would just set a
> flag in the record to indicate that it's complete. Then you can have
> your queries, forms and reports omit the completed records, unless you
> want to see them in history. That's much easier and better-structured
> than moving them to another table.
>
> But if you really *must* archive them to another table, you can write
> a bit of VBA behind your command button to run an Append query to your
> archive table, specifying the primary key from the current record in
> the criteria. Then you can delete the current record. This all
> assumes you don't have any child records under this record.
>
> Armen Stein
> Microsoft Access MVP
> www.JStreetTech.com
>
>

 
Reply With Quote
 
Armen Stein
Guest
Posts: n/a
 
      28th Apr 2009
On Tue, 28 Apr 2009 11:31:03 -0700, How do you clear a report of data
after <(E-Mail Removed)>
wrote:

>I forgot to mention I'am new Access what do you mean by setting a flag in a
>record and hwo would you do this


Well, either way is going to require a little coding, but if you're
interesting in learning more:

Add a field to your table design called something like CompleteFlag.
Set its default to False.

In your form, in the Before Update event, add some VBA in an Event
Procedure that checks for completeness and sets that flag to True.
Something like (air code):

If Me.MyCheckbox1 = True And Me.MyCheckbox2 = True then
' this record is complete
Me.CompleteFlag = True
End If

Then, change any queries or reports that you would like to ignore the
Completed records. You would add a Where clause, like this:

"Select * from MyTable Where CompleteFlag = False"

This query will return only those records that are not yet "complete".

Hope this gets you started at least. I encourage you to search the
Help files and online newsgroups when you have question about specific
techniques.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Appending Overwriting, instead of appending =?Utf-8?B?QW5uZQ==?= Microsoft Access Queries 2 14th Feb 2007 06:05 PM
Appending Help =?Utf-8?B?SnVzdGlu?= Microsoft Access 10 23rd Sep 2005 05:24 AM
Appending =?Utf-8?B?VGFt?= Microsoft Access Forms 0 12th Feb 2005 09:17 AM
Appending...? garry Microsoft Excel Discussion 3 3rd Oct 2004 02:57 PM
Re: Appending Michel Walsh Microsoft Access Queries 0 7th Jan 2004 11:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:01 PM.