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 / December 2007

Tip: Looking for answers? Try searching our database.

Using command button to pull up form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sarchie - 05 Dec 2007 17:27 GMT
I would like to have a command button pull up a form that is linked to the
main form.  The main form displays milestones and I would like to command
button to pull the progress notes form with the record that is linked to the
corresponding milestone.

The expression that I have tried (which I know is wrong) is:

[tblMilestonemthprgntes]![strID]=[tblMlestnes]![Progress Notes]

I would like to eliminate the user's need to enter a parameter value to pull
the corresponding progress note record.

I was going to have a subform inserted on the main form but I was having a
hard time linking the information and also the progress notes has the twelve
months which was not displaying nicely on the form.
Linq Adams - 05 Dec 2007 17:46 GMT
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Your2ndFormName"
   
stLinkCriteria = "[strID]=" & "'" & Me![MainID] & "'"

DoCmd.OpenForm stDocName, , , stLinkCriteria

Where  MainID   is the field on your original form holding the id'ing data
and   strID   is the field in the field in the second form holding (hopefully)
the same data! Probably a more elegant way to do this, but I think this'll do!

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

 
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.