PC Review


Reply
Thread Tools Rate Thread

Changing Unbound Field on a Report

 
 
Joe Williams
Guest
Posts: n/a
 
      31st Dec 2003
Hi!

I have a form that calls a report through a command button. Along with
calling up the report, I would like to set an unbound field on the report to
a text string that I choose. I would create an IF statement in the code that
calls the report up to determine the right string, then I want to be able to
send this string to an unbound field and have it print on the report.

Is there a way to do this? Thanks and have a happy new year!

- joe


 
Reply With Quote
 
 
 
 
Ken Snell
Guest
Posts: n/a
 
      31st Dec 2003
If you're using ACCESS 2002 or higher, you can use the OpenArgs argument of
the DoCmd.OpenReport code step to pass this text string along to the report:

DoCmd.OpenReport "ReportName", , , , , "TextString"

In the report's OnOpen event, you can then set the value of that unbound
control to the OpenArgs property:

Me.TextBoxName.Value = Me.OpenArgs

If you're using an older version of ACCESS, then you'd need to write the
value of the text string to a control on the form (can be hidden), and then
have the report read that control's value.

--
Ken Snell
<MS ACCESS MVP>

"Joe Williams" <(E-Mail Removed)> wrote in message
news:OBLt7L%(E-Mail Removed)...
> Hi!
>
> I have a form that calls a report through a command button. Along with
> calling up the report, I would like to set an unbound field on the report

to
> a text string that I choose. I would create an IF statement in the code

that
> calls the report up to determine the right string, then I want to be able

to
> send this string to an unbound field and have it print on the report.
>
> Is there a way to do this? Thanks and have a happy new year!
>
> - joe
>
>



 
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
Changing a unbound field in a detail line Goldar Microsoft Access Reports 0 12th Nov 2009 09:56 PM
using IsOdd in a unbound field on a report? _Bigred Microsoft Access Reports 2 7th Mar 2009 01:57 AM
Help!!! Changing value of unbound textbox in report Gary Microsoft Access Reports 2 10th Nov 2006 10:57 PM
unbound report field? =?Utf-8?B?Sm9obkx1dGU=?= Microsoft Access Reports 1 11th May 2005 03:10 AM
Unbound Text Field on Report Jim Pockmire2 Microsoft Access Reports 1 13th Feb 2004 01:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:53 AM.