Advertisement

06.15.2007 at 06:42AM PDT, ID: 22636306
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Access 2003 - link popup subform to form
Zone: Access Forms
Tags: access, form, subform, 2003, link
I have an Access 2003 database form. In this form I have a subform. What I want to be able to do is when you click on a button in the subform it brings up a popup form to input information into the subform. How do I link the pop up to the subform.
Start your free trial to view this solution
Question Stats
Zone: Microsoft
Question Asked By: Pdeters
Solution Provided By: jefftwilley
Participating Experts: 1
Solution Grade: A
Views: 210
Translate:
Loading Advertisement...
06.15.2007 at 06:44AM PDT, ID: 19291761

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 06:56AM PDT, ID: 19291855

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 07:00AM PDT, ID: 19291894

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 07:05AM PDT, ID: 19291940

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 07:08AM PDT, ID: 19291966

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 07:49AM PDT, ID: 19292334

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 07:59AM PDT, ID: 19292440

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:02AM PDT, ID: 19292458

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:04AM PDT, ID: 19292472

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:07AM PDT, ID: 19292496

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:09AM PDT, ID: 19292523

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:10AM PDT, ID: 19292529

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:25AM PDT, ID: 19292673

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:26AM PDT, ID: 19292683

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:31AM PDT, ID: 19292741

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:50AM PDT, ID: 19292903

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:52AM PDT, ID: 19292922

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.15.2007 at 08:54AM PDT, ID: 19292938

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 07:52AM PDT, ID: 19307552

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 08:14AM PDT, ID: 19307769

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 08:29AM PDT, ID: 19307919

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 08:40AM PDT, ID: 19308035

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 09:14AM PDT, ID: 19308368

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 09:32AM PDT, ID: 19308529

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 10:04AM PDT, ID: 19308708

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
06.18.2007 at 10:10AM PDT, ID: 19308773

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
06.15.2007 at 06:44AM PDT, ID: 19291761

Rank: Wizard

inside your docmd.openform command, you have an argument where you can either pass an opening argument, or a where statement. If you base your pop-up form on the samerecordset as your subform, then you can pass it the ID number of the record that you're on so that only that record is displayed.

Look at the Docmd.Openform arguements.
J
 
06.15.2007 at 06:56AM PDT, ID: 19291855
Ok.
I have a command button that opens the form  - how do you pass it to the form?
this is wha tis in the code on click
     Private Sub cmdAddNurseNotes_Click()
     On Error GoTo Err_cmdAddNurseNotes_Click

         Dim stDocName As String
         Dim stLinkCriteria As String

         stDocName = "frmPopUpNursesNotes"
         DoCmd.OpenForm stDocName, , , stLinkCriteria

     Exit_cmdAddNurseNotes_Click:
         Exit Sub

     Err_cmdAddNurseNotes_Click:
         MsgBox Err.Description
         Resume Exit_cmdAddNurseNotes_Click
   
     End Sub

 
06.15.2007 at 07:00AM PDT, ID: 19291894

Rank: Wizard

the stLinkCriteria is what you need to define.

for example

stDocName = "frmPopUpNursesNotes"
stLinkCriteria = "[PopUpID]=" Me.ID
DoCmd.OpenForm stDocName, , , stLinkCriteria

the field names are used to pass the value of the record you're on, to the opening form.

also, if you don't want your user to be able to do ANYTHING until this form has closed...you probably want to open it in acDialog mode. That way, it stays on top of everything else until you close it.
J
 
06.15.2007 at 07:05AM PDT, ID: 19291940
Should I be putting this in the command button to open the form or should I be putting it in the form command on open?
 
06.15.2007 at 07:08AM PDT, ID: 19291966

Rank: Wizard

put it in the code you pasted above. that's what opens the form and tells it what record to go to.

What field do both forms have in common? That's the field name you'll need to use where I put [PopupID]

J
 
06.15.2007 at 07:49AM PDT, ID: 19292334
the field they have in common is id - I get a compiling error.
This is the code that I have now.
    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmPopUpNursesNotes"
    stLinkCriteria = "[ID]=" Me.id
    DoCmd.OpenForm stDocName, , , stLinkCriteria
 
06.15.2007 at 07:59AM PDT, ID: 19292440
My main form that this is linked to primary key is the id field which i have linked to the other table as a foreign key
 
06.15.2007 at 08:02AM PDT, ID: 19292458

Rank: Wizard

so the field is ID in both tables? the ID in brackets is the one for the opening form. What's the field called there?

also, change this

stLinkCriteria = "[ID]=" & Me.id
 
06.15.2007 at 08:04AM PDT, ID: 19292472
the primary key i have in the form that is opening is history_id land the foreign key linked to the main form is id
 
06.15.2007 at 08:07AM PDT, ID: 19292496
i changed to this
          stLinkCriteria = "[ID]=" & Me.id

still get compling error with this highlighted
 
06.15.2007 at 08:09AM PDT, ID: 19292523

Rank: Wizard

stLinkCriteria = "[history_id]=" & Me.id

see how that works?

Are both fields numeric types? or text types?
 
06.15.2007 at 08:10AM PDT, ID: 19292529

Rank: Wizard

I guess a good question would be...do you have the ID field actually on your main form?
 
06.15.2007 at 08:25AM PDT, ID: 19292673
I have other subforms on this main form that are linked to the id field.
I put it on there just to make sure - stil getting Compile error: Syntax error
 
06.15.2007 at 08:26AM PDT, ID: 19292683
id didn't try history_id - will rightn ow
 
06.15.2007 at 08:31AM PDT, ID: 19292741
Stilll gettting comple error

The id field in main form is an autonumber
id field in subform is number
id_history is an autonumber
 
06.15.2007 at 08:50AM PDT, ID: 19292903
I will be back on monday trying to work on this.
 
06.15.2007 at 08:52AM PDT, ID: 19292922

Rank: Wizard

if you have time...

try creating a new button on your subform.

Walk through the wizard. It asks you what form to open, it also asks you if you want to go to a specific record. Select that option and tell it the fields to link.

It will come out similar to the code you have for the Click event...and format the stLinkCriteria accordingly. Then if you still want to use the click event, then you can transfer the code over to that event.
J
 
06.15.2007 at 08:54AM PDT, ID: 19292938

Rank: Wizard

here's a working sample if it helps

Private Sub cmdNotes_Click()
' Opens up the notes form for the selected Job
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "frm_Notes"
    stLinkCriteria = "[Job_ID]=" & Me![cboJob]
    DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
 
06.18.2007 at 07:52AM PDT, ID: 19307552
I don't know what I am doing wrong here.
this is what is happening.
I t does bring up the form but it is not linking to the record I want it to.
What I want is it to link to the main record id as a new subrecord
it comes up with an id as 0 not the autonumber related to the main record
 
06.18.2007 at 08:14AM PDT, ID: 19307769
I can get it to link if I have it as a subform on the page but not if I have it open another form
 
06.18.2007 at 08:29AM PDT, ID: 19307919
Maybe there is another way I could go about this.

I have a subform on themain form
the primary key i have in the fsub form is history_id
the primary key on the main form is id
it is a one to many relationship

One id frm the main form to
    many history_id on the sub form

It is in a contnuous form so you can see all the records of notesin the history_id subform.
it is sorted by date - most current date to oldest date.
When you add a new record it goes to the bottom and not the top until you close the main form and reopen it.
Is there a way to have it jsut add to the top right away?
 
06.18.2007 at 08:40AM PDT, ID: 19308035

Rank: Wizard

if you requery your subform yes...it will bring in the latest records from the table and sort

where would you be expecting this to happen? the Subform or the main form event?
 
06.18.2007 at 09:14AM PDT, ID: 19308368
I am thinking the subform event.
If I select the "Add New Record" command button it adds a new record but at the end instead of the beginning of the continuous forms in the subform.
I have been trying different code here - I tried
Docmd.Requery but that seems to need a specific field not a query or table.

Would the best to put it in the even tof the add record in the subform?
 
06.18.2007 at 09:32AM PDT, ID: 19308529

Rank: Wizard

put it on the subform's after update event...that should work
Accepted Solution
 
06.18.2007 at 10:04AM PDT, ID: 19308708
Thank you for walking me through this. It is working perfect!
 
06.18.2007 at 10:10AM PDT, ID: 19308773

Rank: Wizard

Yea!
happy to help.
J
 
 
20080236-EE-VQP-29