A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Run Report of Current Record of Subform



 
 
Thread Tools Display Modes
  #1  
Old August 25th, 2009, 08:33 PM posted to microsoft.public.access.reports
sonofroy
external usenet poster
 
Posts: 47
Default Run Report of Current Record of Subform

Hello I am currently have a macro set to run a report when I run the "On
Click" event from a checkbox in the subform. The problem I have is that it
runs everyrecord in that subform and I only want it to run the current record
in that subform. there is a where condition set for a field in the main part
of the form [Commission Number] but I also want the subform [frmVehInsp]
current record when I click on the check box [Issue]. Any ideas?
  #2  
Old August 25th, 2009, 09:59 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Run Report of Current Record of Subform

Add to your WHERE CONDITION to include the primary key value/field from your
subform.
--
Duane Hookom
Microsoft Access MVP


"sonofroy" wrote:

Hello I am currently have a macro set to run a report when I run the "On
Click" event from a checkbox in the subform. The problem I have is that it
runs everyrecord in that subform and I only want it to run the current record
in that subform. there is a where condition set for a field in the main part
of the form [Commission Number] but I also want the subform [frmVehInsp]
current record when I click on the check box [Issue]. Any ideas?

  #3  
Old August 26th, 2009, 02:41 PM posted to microsoft.public.access.reports
sonofroy
external usenet poster
 
Posts: 47
Default Run Report of Current Record of Subform

Could you elaborate on that please I do not completely understand.

Thank you very much

"Duane Hookom" wrote:

Add to your WHERE CONDITION to include the primary key value/field from your
subform.
--
Duane Hookom
Microsoft Access MVP


"sonofroy" wrote:

Hello I am currently have a macro set to run a report when I run the "On
Click" event from a checkbox in the subform. The problem I have is that it
runs everyrecord in that subform and I only want it to run the current record
in that subform. there is a where condition set for a field in the main part
of the form [Commission Number] but I also want the subform [frmVehInsp]
current record when I click on the check box [Issue]. Any ideas?

  #4  
Old August 26th, 2009, 05:47 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Run Report of Current Record of Subform

I can't elaborate until you elaborate. We don't know how else the report
should be filtered. I expect there is a value in the subform that needs to be
used to filter based on a field in the report's record source. We need this
specific information if you expect more assistance.

Please provide specific field names and data types.

--
Duane Hookom
Microsoft Access MVP


"sonofroy" wrote:

Could you elaborate on that please I do not completely understand.

Thank you very much

"Duane Hookom" wrote:

Add to your WHERE CONDITION to include the primary key value/field from your
subform.
--
Duane Hookom
Microsoft Access MVP


"sonofroy" wrote:

Hello I am currently have a macro set to run a report when I run the "On
Click" event from a checkbox in the subform. The problem I have is that it
runs everyrecord in that subform and I only want it to run the current record
in that subform. there is a where condition set for a field in the main part
of the form [Commission Number] but I also want the subform [frmVehInsp]
current record when I click on the check box [Issue]. Any ideas?

  #5  
Old August 26th, 2009, 07:21 PM posted to microsoft.public.access.reports
sonofroy
external usenet poster
 
Posts: 47
Default Run Report of Current Record of Subform

You know after looking back at both your responses I believe I have figured
it out. I needed an AND statement with the WHERE CONDITION

[COMM NUMBER]=[Forms]![frmvehicles]![Comm Number] And
[InspID]=[Forms]![frmvehicles]![subfrminspection]![InspID]

This got both values needed

Thanks for pointing the way I guess I really did understand!

"Duane Hookom" wrote:

I can't elaborate until you elaborate. We don't know how else the report
should be filtered. I expect there is a value in the subform that needs to be
used to filter based on a field in the report's record source. We need this
specific information if you expect more assistance.

Please provide specific field names and data types.

--
Duane Hookom
Microsoft Access MVP


"sonofroy" wrote:

Could you elaborate on that please I do not completely understand.

Thank you very much

"Duane Hookom" wrote:

Add to your WHERE CONDITION to include the primary key value/field from your
subform.
--
Duane Hookom
Microsoft Access MVP


"sonofroy" wrote:

Hello I am currently have a macro set to run a report when I run the "On
Click" event from a checkbox in the subform. The problem I have is that it
runs everyrecord in that subform and I only want it to run the current record
in that subform. there is a where condition set for a field in the main part
of the form [Commission Number] but I also want the subform [frmVehInsp]
current record when I click on the check box [Issue]. Any ideas?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.