Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Copy & paste format...any help appreciated

 
   Database Forums (Home) -> MS Access RSS
Next:  Access backup  
Author Message
ac512

External


Since: Jun 18, 2008
Posts: 9



(Msg. 1) Posted: Sun Dec 28, 2008 5:36 pm
Post subject: Copy & paste format...any help appreciated
Archived from groups: microsoft>public>access (more info?)

Hello & belated Merry Christmas to you all!

I am using Access 2007 and have a report that automatically updates every
month (using VB). The report has 12 text boxes (1 for every month), and as
the next month updates, I would like to copy the format only from the text
box before.
EG. 2 text boxes, 1 named 200811 and the other named 200812.
Is there any way that I can copy the format of 200811 and paste special in
text box 200812 (200811 has conditional formatting that I would like to apply
to 200812). I have tried a few things but can't seem to get anything to work.

Any help would be greatly appreciated

Thanks in advance
Kind regards
AC

 >> Stay informed about: Copy & paste format...any help appreciated 
Back to top
Login to vote
Clifford Bass

External


Since: Nov 11, 2008
Posts: 43



(Msg. 2) Posted: Mon Dec 29, 2008 5:01 pm
Post subject: RE: Copy & paste format...any help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

You could add something like this to your modification code:

Dim fc1 As FormatCondition
Dim fc2 As FormatCondition

txtField2.BackColor = txtField1.BackColor
txtField2.FontItalic = txtField1.FontItalic
txtField2.FontName = txtField1.FontName
txtField2.FontSize = txtField1.FontSize
txtField2.FontUnderline = txtField1.FontUnderline
txtField2.FontWeight = txtField1.FontWeight
txtField2.ForeColor = txtField1.ForeColor

txtField2.FormatConditions.Delete
For Each fc1 In txtField1.FormatConditions
Set fc2 = txtField2.FormatConditions.Add(fc1.Type, fc1.Operator, _
fc1.Expression1, fc1.Expression2)
fc2.BackColor = fc1.BackColor
fc2.FontBold = fc1.FontBold
fc2.FontItalic = fc1.FontItalic
fc2.FontUnderline = fc1.FontUnderline
fc2.ForeColor = fc1.ForeColor
Next fc1

However, it seems to me that with some better design, maybe of the
report source query, you could eliminate the need to modify the report design
every month.

Hope that helps,

Clifford Bass

"ac512" wrote:

> Hello & belated Merry Christmas to you all!
>
> I am using Access 2007 and have a report that automatically updates every
> month (using VB). The report has 12 text boxes (1 for every month), and as
> the next month updates, I would like to copy the format only from the text
> box before.
> EG. 2 text boxes, 1 named 200811 and the other named 200812.
> Is there any way that I can copy the format of 200811 and paste special in
> text box 200812 (200811 has conditional formatting that I would like to apply
> to 200812). I have tried a few things but can't seem to get anything to work.
>
> Any help would be greatly appreciated
>
> Thanks in advance
> Kind regards
> AC

 >> Stay informed about: Copy & paste format...any help appreciated 
Back to top
Login to vote
ac512

External


Since: Jun 18, 2008
Posts: 9



(Msg. 3) Posted: Mon Dec 29, 2008 5:56 pm
Post subject: RE: Copy & paste format...any help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for your response Clifford. Your suggestion has given me some ideas.
Much appreciated

Kind regards
AC

"Clifford Bass" wrote:

> Hi,
>
> You could add something like this to your modification code:
>
> Dim fc1 As FormatCondition
> Dim fc2 As FormatCondition
>
> txtField2.BackColor = txtField1.BackColor
> txtField2.FontItalic = txtField1.FontItalic
> txtField2.FontName = txtField1.FontName
> txtField2.FontSize = txtField1.FontSize
> txtField2.FontUnderline = txtField1.FontUnderline
> txtField2.FontWeight = txtField1.FontWeight
> txtField2.ForeColor = txtField1.ForeColor
>
> txtField2.FormatConditions.Delete
> For Each fc1 In txtField1.FormatConditions
> Set fc2 = txtField2.FormatConditions.Add(fc1.Type, fc1.Operator, _
> fc1.Expression1, fc1.Expression2)
> fc2.BackColor = fc1.BackColor
> fc2.FontBold = fc1.FontBold
> fc2.FontItalic = fc1.FontItalic
> fc2.FontUnderline = fc1.FontUnderline
> fc2.ForeColor = fc1.ForeColor
> Next fc1
>
> However, it seems to me that with some better design, maybe of the
> report source query, you could eliminate the need to modify the report design
> every month.
>
> Hope that helps,
>
> Clifford Bass
>
> "ac512" wrote:
>
> > Hello & belated Merry Christmas to you all!
> >
> > I am using Access 2007 and have a report that automatically updates every
> > month (using VB). The report has 12 text boxes (1 for every month), and as
> > the next month updates, I would like to copy the format only from the text
> > box before.
> > EG. 2 text boxes, 1 named 200811 and the other named 200812.
> > Is there any way that I can copy the format of 200811 and paste special in
> > text box 200812 (200811 has conditional formatting that I would like to apply
> > to 200812). I have tried a few things but can't seem to get anything to work.
> >
> > Any help would be greatly appreciated
> >
> > Thanks in advance
> > Kind regards
> > AC
 >> Stay informed about: Copy & paste format...any help appreciated 
Back to top
Login to vote
Clifford Bass

External


Since: Nov 11, 2008
Posts: 43



(Msg. 4) Posted: Mon Dec 29, 2008 6:54 pm
Post subject: RE: Copy & paste format...any help appreciated [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You are welcome! Glad to help.

Clifford Bass

"ac512" wrote:

> Thanks for your response Clifford. Your suggestion has given me some ideas.
> Much appreciated
>
> Kind regards
> AC
 >> Stay informed about: Copy & paste format...any help appreciated 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Copy and Paste - Hi all, How can I copy & paste more than 65,000 records in access? Thanks in advance

Copy & Paste A Row Using An Array in A2K - I may be a little out of my league using arrays, but having seen them used before and this my be the approach that I need to use. I'm trying to copy and paste values form all fields in a record except the key field. I plan to use a function that scans th...

Updating a field for multiple records--copy and paste? - Hi, I am using Access 2003 and I have a list of 300 students that I need to assign to either one of two coaches. I want to avoid having to manually enter the coaches' names 150 times each, is there a way to copy and paste data down a column in Access...

How do I crop one picture and then paste it onto another p.. - I want to edit a picture and put my friend's face on it. How can I do that?

Trap Paste event - Hi, how can I trap the Paste Event on a form, as well as being able to detect which was the current field. TIA Paul.
   Database Forums (Home) -> MS Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]