Connecting Tech Pros Worldwide Help | Site Map

Declarations in Modules

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 16th, 2006, 12:55 AM
chrisse_2@hotmail.com
Guest
 
Posts: n/a
Default Declarations in Modules

Hey,

Can somebody help me, I've been trying to locate a reports
'recordsource'. The reports 'On Open' event writes Me.RecordSource =
ReportFixtureSpecControlSource.

I went searching for this and found it in one of the Modules in access.
It says 'Public ReportFixtureSpecControlSource'

The problem is i need to know what the recordsource for the report is
so i can add to it.

Thanks for your help.

Christina


  #2  
Old June 16th, 2006, 01:45 AM
w_a_n_n_a_l_l_ -@-_s_b_c_g_l_o_b_a_l._n_e_t
Guest
 
Posts: n/a
Default Re: Declarations in Modules

If there are no parameters called for in the definition line (Public
ReportFixtureSpecControlSource) you can go to any module, type control-G to
go the immediate window and type this:

?ReportFixtureSpecControlSource

and press return.

Presumably the function returns a string that can be used as the
recordsource for a report.
  #3  
Old June 16th, 2006, 02:05 AM
chrisse_2@hotmail.com
Guest
 
Posts: n/a
Default Re: Declarations in Modules

Hey,

Thanks for the reply. I did what you said and nothing happened. Any
other suggestions?

  #4  
Old June 16th, 2006, 06:25 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default Re: Declarations in Modules


chrisse_2@hotmail.com wrote:[color=blue]
> Hey,
>
> Thanks for the reply. I did what you said and nothing happened. Any
> other suggestions?[/color]

Well, that's your problem. Your report has no recordsource, because
the function isn't returning a value. How about posting the code for
this function.

(Hey Randy, your psychic abilities working? Mine aren't...)

  #5  
Old June 16th, 2006, 06:45 AM
chrisse_2@hotmail.com
Guest
 
Posts: n/a
Default Re: Declarations in Modules


pietlinden@hotmail.com wrote:[color=blue]
> chrisse_2@hotmail.com wrote:[color=green]
> > Hey,
> >
> > Thanks for the reply. I did what you said and nothing happened. Any
> > other suggestions?[/color]
>
> Well, that's your problem. Your report has no recordsource, because
> the function isn't returning a value. How about posting the code for
> this function.
>
> (Hey Randy, your psychic abilities working? Mine aren't...)[/color]

Hey,

The problem is that i can't find that function anywhere else. I didn't
make this database but i have to add linked images to the report. I
can't get the image control to work properly without adding code to the
recordsource.

Also, i know this maybe a really silly question but i can't work it out
at the moment, all this code is starting to get to me! When you add an
image control to a report you write code into the forms on current
event. As a report has no on current event, where would you place the
code?

Thanks, sorry for the vagueness the code in this database is really
messy!

Cheers

  #6  
Old June 16th, 2006, 07:35 AM
Terry Kreft
Guest
 
Posts: n/a
Default Re: Declarations in Modules

This is a classic tracing operation.

I'll start from the beginning.

On the line
Me.RecordSource = ReportFixtureSpecControlSource.

Click on the word ReportFixtureSpecControlSource and press Shift-F2 on the
keyboard.
The focus will jump to the declaration of ReportFixtureSpecControlSource.

The declaration will either be a function, a const (unlikely in this case)
or a variable.

If it is a const then your search is finished as the value is declared.

If it is a function then you just need to read and understand the function
in order to determine the value.

If it is a variable then you can then do a search on the phrase
"ReportFixtureSpecControlSource =" (note the space between the variable and
the = sign), this will then show you all the places where the variable has
been set to a value.



--

Terry Kreft


<chrisse_2@hotmail.com> wrote in message
news:1150419565.725416.105130@y41g2000cwy.googlegr oups.com...[color=blue]
> Hey,
>
> Can somebody help me, I've been trying to locate a reports
> 'recordsource'. The reports 'On Open' event writes Me.RecordSource =
> ReportFixtureSpecControlSource.
>
> I went searching for this and found it in one of the Modules in access.
> It says 'Public ReportFixtureSpecControlSource'
>
> The problem is i need to know what the recordsource for the report is
> so i can add to it.
>
> Thanks for your help.
>
> Christina
>[/color]


  #7  
Old June 16th, 2006, 02:35 PM
Rick Wannall
Guest
 
Posts: n/a
Default Re: Declarations in Modules

In your code, click on the name of the function. Then press shift-F2. You
should land in the function. Copy the code and paste it here.
  #8  
Old June 18th, 2006, 12:05 AM
Larry Linson
Guest
 
Posts: n/a
Default Re: Declarations in Modules

<chrisse_2@hotmail.com> wrote
[color=blue]
> Also, i know this maybe a really silly
> question but i can't work it out at the
> moment, all this code is starting to get
> to me! When you add an image control
> to a report you write code into the forms
> on current event. As a report has no on
> current event, where would you place the
> code?[/color]

In a Report, you place in the Report's OnPrint event similar code to what
you'd place in the Form's OnCurrent.

To verify that the Report does or does not have a defined RecordSource (in
addition to whatever is being set from code), open the Report in Design
View, click the upper-leftmost little square, choose Properties, click the
Data tab in the Property dialog, and the first item is the pre-defined
Record Source of the Report (if any).
[color=blue]
> The reports 'On Open' event writes
> Me.RecordSource =
> ReportFixtureSpecControlSource.[/color]
[color=blue]
> I went searching for this and found it in
> one of the Modules in access. It says
> 'Public ReportFixtureSpecControlSource'[/color]

I'd wager there is more to that declaration... like an "As String" clause?
This is the variable in which a string is created that will be set into the
Report's RecordSource by the first code you cited.
[color=blue]
> The problem is i need to know what the
> recordsource for the report is so i can
> add to it.[/color]

Now you need to search for "ReportFixtureSpecControlSource" to see what is
set into that variable to be later moved into the RecordSource of the
Report. It might be done in a Standard Module, or might be done in a Form's
Module.

Larry Linson
Microsoft Access MVP


Larry Linson
Microsoft Access MVP




  #9  
Old June 19th, 2006, 02:25 AM
chrisse_2@hotmail.com
Guest
 
Posts: n/a
Default Re: Declarations in Modules

Thanks for all your help. I found the recordsource for the report in
another form. By the way when i pressed Shift-F2 nothing happened. The
report works perfectly now, i am greatly appreciative.

Christina

  #10  
Old June 19th, 2006, 08:45 AM
Terry Kreft
Guest
 
Posts: n/a
Default Re: Declarations in Modules

You did it wrong then.

--

Terry Kreft


<chrisse_2@hotmail.com> wrote in message
news:1150684044.814431.33660@h76g2000cwa.googlegro ups.com...[color=blue]
> <SNIP> By the way when i pressed Shift-F2 nothing happened. <SNIP>
>
> Christina
>[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.