Rabu, 07 Maret 2012

Bls: [MS_AccessPros] Copy all data on a form to clipboard

 

John-

It began from many articles that 've read mentioned that adviced to avoid using expressions in queries (especially to IIf), here are some links :

http://support.microsoft.com/kb/209126
http://www.advent-it.co.uk/archives/689
http://bytes.com/topic/access/insights/629397-how-optimize-queries-recordsets

and in an article..(i can't find it again...) described that expressions in query caused the jet to calculated all of the records before retrieving data,..
example we have 1000 records data, Jet have to calculated them all (if the queries have expressions) first and then displayed the data, although
we just want to display 1 data (Parametered Query / With WHERE clause).

But here are the examples of expressions that i can't avoid to use them in my queries :

________________________________
Dari: John Viescas <john@viescas.com>
Kepada: MS_Access_Professionals@yahoogroups.com
Dikirim: Rabu, 7 Maret 2012 20:11
Judul: RE: [MS_AccessPros] Copy all data on a form to clipboard


 
Hendra-

Using an expression in a query is no more expensive that using that same expression in a bound report. What are the expressions you are currently using on the form?

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Nashua, NH)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Agestha Hendra
Sent: Wednesday, March 07, 2012 1:46 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Bls: [MS_AccessPros] Copy all data on a form to clipboard

Thanx John...

That is the point...i avoid to use any expressions in queries as long as i can,,,especially to IIf Function.
i try to use it on a form or report when it's possible

Regards
Hendra

________________________________
Dari: John Viescas <john@viescas.com>
Kepada: MS_Access_Professionals@yahoogroups.com
Dikirim: Rabu, 7 Maret 2012 9:38
Judul: RE: [MS_AccessPros] Copy all data on a form to clipboard

Hendra-

You could try:

RunCommand acCmdSelectRecord
RunCommand acCmdCopy

That will copy all the columns in the current record to the clipboard, but it
will not copy any text box that uses an expression as the Control Source. You
can fix that by putting the expression in the query that is the Record Source
for the form, and then bind the text box to the calculated column from the
query.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Nashua, NH)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of
agesthahendra@ymail.com
Sent: Tuesday, March 06, 2012 7:09 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Copy all data on a form to clipboard

Hi Everyone...

Can we copy all data on a form included all fields and values of calculated
unbound text box and Columns Head to clipboard..?
For example i have a form that have Record Source from a table that have
3 fields :ID, FirstName, LastName...
and on that form i have an unbound textbox (txtName) with Control Source
=[LastName]&", "&[FirstName]...so the form have 4 controls for data to
display....asumed that the form have 10 records...
Can we copy all thoose 10 records displayed data on the form included data in
txtName and the head of columns to clipboard..?
All i want to do is give the user to enable copy the data on the form
to clipboard and then they can paste it to excel...i can do this with
open the query that builded from the record source table, but i want to
do this with a form...

Regards
Hendra

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar