Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

report to reference a variable

Discussion in 'Information Technology' started by Pritesh_karma, Jul 28, 2006.

  1. Pritesh_karma

    Pritesh_karma
    Expand Collapse
    Guest

    Hi.

    I have a report total sales of some firms.
    I need, in the report, to be able to access a single sales of a firm,
    which is stored in a variable in my vb code.
    How do i put the variable in the report, in my textbox( control source)

    thanks
     
  2. Loading...

    Similar Threads Forum Date
    UK British Sikh Report-2016 Breaking News Mar 24, 2016
    1984 The Story I Did Not Report In ’84 History of Sikhism Jun 28, 2015
    Opinion Top Green Beret Officer Forced to Resign Over Affair With WaPo Reporter Breaking News Jun 26, 2014
    United Sikhs New Report Shows Increasing Hate Attacks on Sikhs Sikh Organisations May 21, 2014
    Legal ACLU reports: Judge orders Sikh man, "Remove that rag, or Go to Jail! Breaking News Sep 27, 2013

  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Create a function that returns the value of the variable, and use the
    function in your report.

    (Note: it has to be a public function in a module, not a class or module
    associated with a form)

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Pritesh_karma" <pritesh01@gmail.com> wrote in message
    news:1152183366.151869.36160@a14g2000cwb.googlegroups.com...
    > Hi.
    >
    > I have a report total sales of some firms.
    > I need, in the report, to be able to access a single sales of a firm,
    > which is stored in a variable in my vb code.
    > How do i put the variable in the report, in my textbox( control source)
    >
    > thanks
    >
     
  4. Pritesh_karma

    Pritesh_karma
    Expand Collapse
    Guest

    thanks douglas...
    how do i do this...
    Im quite new to programming....


    Douglas J Steele wrote:
    > Create a function that returns the value of the variable, and use the
    > function in your report.
    >
    > (Note: it has to be a public function in a module, not a class or module
    > associated with a form)
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Pritesh_karma" <pritesh01@gmail.com> wrote in message
    > news:1152183366.151869.36160@a14g2000cwb.googlegroups.com...
    > > Hi.
    > >
    > > I have a report total sales of some firms.
    > > I need, in the report, to be able to access a single sales of a firm,
    > > which is stored in a variable in my vb code.
    > > How do i put the variable in the report, in my textbox( control source)
    > >
    > > thanks
    > >
     
  5. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Create a new module.

    Inside the module, type something like:


    Public MyVariable As Long

    Public Function MyFunction() As Long
    MyFunction = MyVariable
    End Function


    (use the appropriate names for MyVariable and MyFunction. If your existing
    variable is a different data type than Long, make sure you change the
    declaration of the function as well)

    Save the module, making sure you don't name the module the same as the
    function.

    Wherever you need the value of MyVariable, use MyFunction instead.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Pritesh_karma" <pritesh01@gmail.com> wrote in message
    news:1152191508.877545.78150@a14g2000cwb.googlegroups.com...
    > thanks douglas...
    > how do i do this...
    > Im quite new to programming....
    >
    >
    > Douglas J Steele wrote:
    > > Create a function that returns the value of the variable, and use the
    > > function in your report.
    > >
    > > (Note: it has to be a public function in a module, not a class or module
    > > associated with a form)
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "Pritesh_karma" <pritesh01@gmail.com> wrote in message
    > > news:1152183366.151869.36160@a14g2000cwb.googlegroups.com...
    > > > Hi.
    > > >
    > > > I have a report total sales of some firms.
    > > > I need, in the report, to be able to access a single sales of a firm,
    > > > which is stored in a variable in my vb code.
    > > > How do i put the variable in the report, in my textbox( control

    source)
    > > >
    > > > thanks
    > > >

    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page