473,839 Members | 1,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the results of a report calculation or data field

I am running an Access report from VB via ADO.

The report has a field that shows the date it was run.

How can I return the data from this field to VB or have Access post it
to a table when the report runs?

Thank you.

Greg Teets
Cincinnati OH USA
Nov 13 '05 #1
5 1819
Br
Greg Teets <gt******@yahoo .com> wrote:
I am running an Access report from VB via ADO.

The report has a field that shows the date it was run.

How can I return the data from this field to VB or have Access post it
to a table when the report runs?

Thank you.

Greg Teets
Cincinnati OH USA


There are a few ways...

I use a table with the list of reports which also contains the
recordsource, the time it was last run and by whom. I also have a table
with a list of filters the user can use in my "report wizard". I call
reports from a form based on this table. The user selects the report
from a list and the form then moves to that record in my report table.
It's then a simple matter of setting the time field to the current
date/time ie. =Now().

Alternatively, you can have some code on your report's OnOpen event that
updates the date in the table.
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #2
On Mon, 18 Jul 2005 22:24:55 GMT, "Br@dley" <n0****@4u.co m> wrote:
Greg Teets <gt******@yahoo .com> wrote:
I am running an Access report from VB via ADO.

The report has a field that shows the date it was run.

How can I return the data from this field to VB or have Access post it
to a table when the report runs?

Thank you.

Greg Teets
Cincinnati OH USA


There are a few ways...

I use a table with the list of reports which also contains the
recordsource , the time it was last run and by whom. I also have a table
with a list of filters the user can use in my "report wizard". I call
reports from a form based on this table. The user selects the report
from a list and the form then moves to that record in my report table.
It's then a simple matter of setting the time field to the current
date/time ie. =Now().

Alternativel y, you can have some code on your report's OnOpen event that
updates the date in the table.

All the code is in VB.

Is there a way to pass the field's date back to VB after the report is
run? So far, I have no code in Access and would like to keep it that
way if possible.

Thanks
Nov 13 '05 #3
Br
gt******@yahoo. com <Greg Teets> wrote:
On Mon, 18 Jul 2005 22:24:55 GMT, "Br@dley" <n0****@4u.co m> wrote:
Greg Teets <gt******@yahoo .com> wrote:
I am running an Access report from VB via ADO.

The report has a field that shows the date it was run.

How can I return the data from this field to VB or have Access post
it to a table when the report runs?

Thank you.

Greg Teets
Cincinnati OH USA


There are a few ways...

I use a table with the list of reports which also contains the
recordsource, the time it was last run and by whom. I also have a
table with a list of filters the user can use in my "report wizard".
I call reports from a form based on this table. The user selects the
report from a list and the form then moves to that record in my
report table. It's then a simple matter of setting the time field to
the current date/time ie. =Now().

Alternatively, you can have some code on your report's OnOpen event
that updates the date in the table.

All the code is in VB.

Is there a way to pass the field's date back to VB after the report is
run? So far, I have no code in Access and would like to keep it that
way if possible.

Thanks


Then when you call the report from VB write the data value into the
table....
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #4
On Mon, 18 Jul 2005 23:46:34 GMT, "Br@dley" <n0****@4u.co m> wrote:
gt******@yahoo .com <Greg Teets> wrote:
On Mon, 18 Jul 2005 22:24:55 GMT, "Br@dley" <n0****@4u.co m> wrote:
Greg Teets <gt******@yahoo .com> wrote:
I am running an Access report from VB via ADO.

The report has a field that shows the date it was run.

How can I return the data from this field to VB or have Access post
it to a table when the report runs?

Thank you.

Greg Teets
Cincinnati OH USA

There are a few ways...

I use a table with the list of reports which also contains the
recordsource, the time it was last run and by whom. I also have a
table with a list of filters the user can use in my "report wizard".
I call reports from a form based on this table. The user selects the
report from a list and the form then moves to that record in my
report table. It's then a simple matter of setting the time field to
the current date/time ie. =Now().

Alternatively, you can have some code on your report's OnOpen event
that updates the date in the table.

All the code is in VB.

Is there a way to pass the field's date back to VB after the report is
run? So far, I have no code in Access and would like to keep it that
way if possible.

Thanks


Then when you call the report from VB write the data value into the
table....

That's my question what is the syntax to pick the data off the report?

The data I want is not available until the report RUNS not when it is
called.

Thanks.
Nov 13 '05 #5
Br
gt******@yahoo. com <Greg Teets> wrote:
On Mon, 18 Jul 2005 23:46:34 GMT, "Br@dley" <n0****@4u.co m> wrote:
gt******@yahoo. com <Greg Teets> wrote:
On Mon, 18 Jul 2005 22:24:55 GMT, "Br@dley" <n0****@4u.co m> wrote:

Greg Teets <gt******@yahoo .com> wrote:
> I am running an Access report from VB via ADO.
>
> The report has a field that shows the date it was run.
>
> How can I return the data from this field to VB or have Access
> post it to a table when the report runs?
>
> Thank you.
>
> Greg Teets
> Cincinnati OH USA

There are a few ways...

I use a table with the list of reports which also contains the
recordsource, the time it was last run and by whom. I also have a
table with a list of filters the user can use in my "report
wizard". I call reports from a form based on this table. The user
selects the report from a list and the form then moves to that
record in my report table. It's then a simple matter of setting
the time field to the current date/time ie. =Now().

Alternatively, you can have some code on your report's OnOpen event
that updates the date in the table.
All the code is in VB.

Is there a way to pass the field's date back to VB after the report
is run? So far, I have no code in Access and would like to keep it
that way if possible.

Thanks


Then when you call the report from VB write the data value into the
table....

That's my question what is the syntax to pick the data off the report?

The data I want is not available until the report RUNS not when it is
called.

Thanks.

Not sure from VB.. From Access it's Reports!rptMyRe port![MyField]
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2198
by: Jacob Barnett | last post by:
Access 2000 main report does not display subreport data in preview and may or may not print... sometimes. Usually, the entire report is fine. The behavior does not seem to depend on particular records or data and I have not found a reliable way to reproduce the behavior. The subreport can always be generated independently and always prints. There is data in both the main report and the subreport. The link child and master fields are...
3
1398
by: CSDunn | last post by:
Hello, I have a situation in which each record on a report has 40 fields, any one of which can contain a value of 'C', or 'I', or 'B'. I need to create one calculated field on the report that will COUNT the number of fields with a value of 'C'(and shows the integer result), and another calculation that will take the COUNT of the fields with a value of 'C' and divide that by the total number of fields. The second calculation would be...
2
1522
by: Den | last post by:
I have a report where at the report footer, I have a field that sums up the total of a field in the report. My problem is, when the report is empty the field shows #error. Would someone tell me a way to have it so that when the report is empty, the sum shows as a zero or displays a message like "No records in report"? Thanks.
2
3918
by: Del | last post by:
Thanks in advance for any help. I have a database that was created in Access 2000. Several users have been upgraded to Access 2003. Since upgrading to 2003 we have noticed that some of the calculated fields are not being populated. The database is a samll invoicing database on the form and report we have columns call Unit Cost. This is the actual cost of the part and is pulled from our parts master table and is displayed in a sub form...
7
2423
by: manning_news | last post by:
I've got a report that's not sorting correctly. I build a SQL statement and assign it to the recordsource in the Open event, sorting the data the way the user chooses. The user can choose up to 3 sorts using a form that opens before the report opens. When the report previews, it ignores the users' sort request and always sorts by the primary key even though ORDER BY is explicity set to another field other than primary key. If I copy...
2
1319
by: EManning | last post by:
Using A2K. I have a series of unbound textboxes on a report. I made a duplicate of these textboxes (Edit...Duplicate) to make a new series, then put this new series on another report. But I can't get the duplicated textboxes to print their values. The first series prints fine. Any ideas? Thanks for any help or advice.
3
4749
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on this calculated field, no value is posted. How/where do I get my calculated values to also show up in the tables and reports? Thanks, Kelley
1
2240
by: sgmarty | last post by:
Hi, I have an interesting problem. Without using reduncant data, how can I design a calculation field to get a running total from values in different records? I'm designing a usage/month report, and I'm confused. Date Value Calculation Record1: 08/05/06 12345 Record2: 09/05/06 23456 (23456-12345) Record3: 10/05/06 34567 (34567-23456) Thanks for the help. Steve
6
1648
by: Kevin | last post by:
On some records, the calculation is correct but on others it is wrong, why? the calculation is as follows (the source of each part of the calculation is below it): txtActualWage =\ txtLaborRevenue =rptLaborSubReport!TotalLaborCost TotalLaborCost =Sum((DateDiff("n",,)/60)*)
0
9855
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9697
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10908
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10586
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10293
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9426
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7828
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.