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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Switchboard for reports - repost and revision



 
 
Thread Tools Display Modes
  #1  
Old December 12th, 2006, 11:45 PM posted to microsoft.public.access.forms
Ken
external usenet poster
 
Posts: 17
Default Switchboard for reports - repost and revision

Greetings all:

I posted this about 10 days ago, and I'm still looking for an answer.
Here is the current status. Any help is appreciated:

I have a membership database form with a button on it to display a
smaller form with a choice of reports to print. I want these reports to
print with data from various related databases, but only for the member
who is being displayed on the membership form. I've racked my brain
trying to figure this out, but with no luck.

I've simplified a little and still having a problem.

I've placed a preview button on the form, it will still show the first
item in the table index, as well as the ability to scroll thru the rows
in the table. What I need is a single report screen for the current
info in the form (from multi tables). Here is the query
(q_renewal_form) and the click event code.

SELECT Member_Info.First_name, Payments.Payment_type, Payments.[Dues
Year], Payments.Amount_Pd, Payments.Date_Pd, Member_Info.Last_name,
Member_Info.Degree, Member_Address.Address_1, Member_Address.Address_2,
Member_Address.City, Member_Address.State, Member_Address.Zip,
Member_Address.Province, Member_Address.Country,
Member_Address.Phone_1, Member_Address.Email_address
FROM (Member_Info INNER JOIN Payments ON
Member_Info.ID_Number=Payments.ID_Number) INNER JOIN Member_Address ON
Member_Info.ID_Number=Member_Address.ID_Number;

-------

Private Sub Command197_Click()
On Error GoTo Err_Command197_Click

Dim stDocName As String
Dim StrWhere As String
StrWhere = "[ID_Number] = " & Me!ID_Number
stDocName = "2007 Renewal Form"
DoCmd.OpenReport stDocName, acPreview, StrWhere, q_renewal_form

Exit_Command197_Click:
Exit Sub

Err_Command197_Click:
MsgBox Err.Description
Resume Exit_Command197_Click

Again, thanx for any help

Ken

  #2  
Old December 12th, 2006, 11:54 PM posted to microsoft.public.access.forms
Damian S
external usenet poster
 
Posts: 741
Default Switchboard for reports - repost and revision

Hi Ken,

Why not simply have the query that drives your report with a where clause
that looks up the member from the form, eg:

WHERE MemberID = forms!FORMNAME.MEMBERIDFIELD

Damian.

"Ken" wrote:

Greetings all:

I posted this about 10 days ago, and I'm still looking for an answer.
Here is the current status. Any help is appreciated:

I have a membership database form with a button on it to display a
smaller form with a choice of reports to print. I want these reports to
print with data from various related databases, but only for the member
who is being displayed on the membership form. I've racked my brain
trying to figure this out, but with no luck.

I've simplified a little and still having a problem.

I've placed a preview button on the form, it will still show the first
item in the table index, as well as the ability to scroll thru the rows
in the table. What I need is a single report screen for the current
info in the form (from multi tables). Here is the query
(q_renewal_form) and the click event code.

SELECT Member_Info.First_name, Payments.Payment_type, Payments.[Dues
Year], Payments.Amount_Pd, Payments.Date_Pd, Member_Info.Last_name,
Member_Info.Degree, Member_Address.Address_1, Member_Address.Address_2,
Member_Address.City, Member_Address.State, Member_Address.Zip,
Member_Address.Province, Member_Address.Country,
Member_Address.Phone_1, Member_Address.Email_address
FROM (Member_Info INNER JOIN Payments ON
Member_Info.ID_Number=Payments.ID_Number) INNER JOIN Member_Address ON
Member_Info.ID_Number=Member_Address.ID_Number;

-------

Private Sub Command197_Click()
On Error GoTo Err_Command197_Click

Dim stDocName As String
Dim StrWhere As String
StrWhere = "[ID_Number] = " & Me!ID_Number
stDocName = "2007 Renewal Form"
DoCmd.OpenReport stDocName, acPreview, StrWhere, q_renewal_form

Exit_Command197_Click:
Exit Sub

Err_Command197_Click:
MsgBox Err.Description
Resume Exit_Command197_Click

Again, thanx for any help

Ken


  #3  
Old December 13th, 2006, 03:45 AM posted to microsoft.public.access.forms
Ken
external usenet poster
 
Posts: 17
Default Switchboard for reports - repost and revision

I'll try it and let you know.

Thanks

K.


Damian S wrote:
Hi Ken,

Why not simply have the query that drives your report with a where clause
that looks up the member from the form, eg:

WHERE MemberID = forms!FORMNAME.MEMBERIDFIELD

Damian.

"Ken" wrote:

Greetings all:

I posted this about 10 days ago, and I'm still looking for an answer.
Here is the current status. Any help is appreciated:

I have a membership database form with a button on it to display a
smaller form with a choice of reports to print. I want these reports to
print with data from various related databases, but only for the member
who is being displayed on the membership form. I've racked my brain
trying to figure this out, but with no luck.

I've simplified a little and still having a problem.

I've placed a preview button on the form, it will still show the first
item in the table index, as well as the ability to scroll thru the rows
in the table. What I need is a single report screen for the current
info in the form (from multi tables). Here is the query
(q_renewal_form) and the click event code.

SELECT Member_Info.First_name, Payments.Payment_type, Payments.[Dues
Year], Payments.Amount_Pd, Payments.Date_Pd, Member_Info.Last_name,
Member_Info.Degree, Member_Address.Address_1, Member_Address.Address_2,
Member_Address.City, Member_Address.State, Member_Address.Zip,
Member_Address.Province, Member_Address.Country,
Member_Address.Phone_1, Member_Address.Email_address
FROM (Member_Info INNER JOIN Payments ON
Member_Info.ID_Number=Payments.ID_Number) INNER JOIN Member_Address ON
Member_Info.ID_Number=Member_Address.ID_Number;

-------

Private Sub Command197_Click()
On Error GoTo Err_Command197_Click

Dim stDocName As String
Dim StrWhere As String
StrWhere = "[ID_Number] = " & Me!ID_Number
stDocName = "2007 Renewal Form"
DoCmd.OpenReport stDocName, acPreview, StrWhere, q_renewal_form

Exit_Command197_Click:
Exit Sub

Err_Command197_Click:
MsgBox Err.Description
Resume Exit_Command197_Click

Again, thanx for any help

Ken



  #4  
Old December 13th, 2006, 11:28 AM posted to microsoft.public.access.forms
Ken
external usenet poster
 
Posts: 17
Default Switchboard for reports - repost and revision

Damian:

On first look this should work. I think I need to refine the code to
not show anything when there is no data in any part of the join. Next
step....


Ken wrote:
I'll try it and let you know.

Thanks

K.


Damian S wrote:
Hi Ken,

Why not simply have the query that drives your report with a where clause
that looks up the member from the form, eg:

WHERE MemberID = forms!FORMNAME.MEMBERIDFIELD

Damian.

"Ken" wrote:

Greetings all:

I posted this about 10 days ago, and I'm still looking for an answer.
Here is the current status. Any help is appreciated:

I have a membership database form with a button on it to display a
smaller form with a choice of reports to print. I want these reports to
print with data from various related databases, but only for the member
who is being displayed on the membership form. I've racked my brain
trying to figure this out, but with no luck.

I've simplified a little and still having a problem.

I've placed a preview button on the form, it will still show the first
item in the table index, as well as the ability to scroll thru the rows
in the table. What I need is a single report screen for the current
info in the form (from multi tables). Here is the query
(q_renewal_form) and the click event code.

SELECT Member_Info.First_name, Payments.Payment_type, Payments.[Dues
Year], Payments.Amount_Pd, Payments.Date_Pd, Member_Info.Last_name,
Member_Info.Degree, Member_Address.Address_1, Member_Address.Address_2,
Member_Address.City, Member_Address.State, Member_Address.Zip,
Member_Address.Province, Member_Address.Country,
Member_Address.Phone_1, Member_Address.Email_address
FROM (Member_Info INNER JOIN Payments ON
Member_Info.ID_Number=Payments.ID_Number) INNER JOIN Member_Address ON
Member_Info.ID_Number=Member_Address.ID_Number;

-------

Private Sub Command197_Click()
On Error GoTo Err_Command197_Click

Dim stDocName As String
Dim StrWhere As String
StrWhere = "[ID_Number] = " & Me!ID_Number
stDocName = "2007 Renewal Form"
DoCmd.OpenReport stDocName, acPreview, StrWhere, q_renewal_form

Exit_Command197_Click:
Exit Sub

Err_Command197_Click:
MsgBox Err.Description
Resume Exit_Command197_Click

Again, thanx for any help

Ken



 




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 05:22 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.