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 / Forms / August 2006

Tip: Looking for answers? Try searching our database.

Linking results to new forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SmoothMasterZ@gmail.com - 29 Aug 2006 15:29 GMT
I've been working on this for about a month... but i've hit a wall...

I've set up a form (Mainform) that will display information gleaned
from a query (Mainquery) on a database. One piece of information
Mainform pulls from the query is a log of activity, which is placed in
a subform (SubMainform). When SubMainform is double-clicked, the log is
placed in a new form that pops up (logform). My question to you, oh
learned ones of the forums, is how do I limit the information displayed
in logform so the information displayed in logform is from the same
record as Mainform? Currently, when logform pops up, it displays all
the logs for all the records from Mainform.
If I've been vauge or omited any information needed, let me know and
i'll be happy to clarify as best I can

Regards,
Michael Zettler
pietlinden@hotmail.com - 30 Aug 2006 00:12 GMT
<snip>
Currently, when logform pops up, it displays all
the logs for all the records from Mainform.
</snip>

sounds like you need to pass a filter in the open event of your popup.
You should be able to do this with the button wizard.

Form Operations, Open Form, <next>, Select the Logform,<next>, select
specific data, select the matching fields, select the text/picture for
the button, click done.

this is the code the wizard builds...

Private Sub cmdOpenChildrenForm_Click()
On Error GoTo Err_cmdOpenChildrenForm_Click

   Dim stDocName As String
   Dim stLinkCriteria As String

  'open what form?
   stDocName = "frmChildren"

  'show which records?
   stLinkCriteria = "[FEmployeeID]=" & Me![EmployeeID]
   DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdOpenChildrenForm_Click:
   Exit Sub

Err_cmdOpenChildrenForm_Click:
   MsgBox Err.Description
   Resume Exit_cmdOpenChildrenForm_Click
   
End Sub
 
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.