sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
chrisse_2@hotmail.com's Avatar

Declarations in Modules


Question posted by: chrisse_2@hotmail.com (Guest) on June 16th, 2006 01:55 AM
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

9 Answers Posted
w_a_n_n_a_l_l_ -@-_s_b_c_g_l_o_b_a_l._n_e_t's Avatar
w_a_n_n_a_l_l_ -@-_s_b_c_g_l_o_b_a_l._n_e_t June 16th, 2006 02:45 AM
Guest - n/a Posts
#2: 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.
chrisse_2@hotmail.com's Avatar
chrisse_2@hotmail.com June 16th, 2006 03:05 AM
Guest - n/a Posts
#3: Re: Declarations in Modules

Hey,

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

pietlinden@hotmail.com's Avatar
pietlinden@hotmail.com June 16th, 2006 07:25 AM
Guest - n/a Posts
#4: Re: Declarations in Modules


Join Bytes! 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...)

chrisse_2@hotmail.com's Avatar
chrisse_2@hotmail.com June 16th, 2006 07:45 AM
Guest - n/a Posts
#5: Re: Declarations in Modules


Join Bytes! wrote:[color=blue]
> Join Bytes! 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

Terry Kreft's Avatar
Guest - n/a Posts
#6: 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]


Rick Wannall's Avatar
Guest - n/a Posts
#7: 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.
Larry Linson's Avatar
Guest - n/a Posts
#8: 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




chrisse_2@hotmail.com's Avatar
chrisse_2@hotmail.com June 19th, 2006 03:25 AM
Guest - n/a Posts
#9: 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

Terry Kreft's Avatar
Guest - n/a Posts
#10: 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]


 
Not the answer you were looking for? Post your question . . .
196,998 members ready to help you find a solution.
Join Bytes.com

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 196,998 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors