Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

LINKING FORM TO REPORT

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AlipioSequeira - 17 May 2007 17:37 GMT
Hello again to all acces users.

Here is a question, I've been trying to solve for a long time.
I have this form presenting data of a training course.
And have a report presenting data of the students that attended the training.
The Report has the following structure.
Main report: data of company promoting the training course.
Subform: presenting data abaout one specific training course
Subform.subform: presenting data of the students.

Now, the linking data is a alfanumeric code located in the main subform that
identifies the training course. How can I have a button linking a form and
locates in the report the training course presented in the subform.

If this is not clear, please ask or present doubts.

Greatings from Portugal.
AlipioSequeira.
Wayne-I-M - 17 May 2007 18:00 GMT
Hi

Create a new button "on the subform"

Private Sub ButtonName_Click()
DoCmd.OpenReport "ReportName", acViewNormal, , "FieldInTheReport = " &
Me.ControlOnTheSubForm
End Sub

Change these names
ButtonName
ReportName
FieldInTheReport
ControlOnTheSubForm

Note
ControlOnTheSubForm is the control on the subform showing details of the
course

Good luck
End Sub

Signature

Wayne
Manchester, England.

> Hello again to all acces users.
>
[quoted text clipped - 14 lines]
> Greatings from Portugal.
> AlipioSequeira.
AlipioSequeira - 29 May 2007 16:41 GMT
Hello Wayne.

Thanks for your help.
Couldn't quite make it work.

Can we go to basics and script just for opening a report from a form linked
by a field named "Chave do curso".
Both fields are in the main form or report. so it shoul be fine for me to
understand the code.

Greatings from Portugal.
AlípioSequeira.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.