Solved

Access 2003 - Add a new record want subform to pop up and populate with inform from main form

Posted on 2007-11-30
4
570 Views
Last Modified: 2013-11-28
I have an Access 2003 form. It is patient history/information. When I add a new visit for that patient I would like to be able to have the form pop up to add this information and then also populate it with some information from the main form.
0
Comment
Question by:Pdeters
  • 2
4 Comments
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 20382866
yes. you can do. try coding via vba.
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 20383004
open your popup form with the patient id as open args

docmd.openform "frmVisit", openargs:= me.patientid

in the load event of the popup form

private sub form_load()

if  not isnull(me.openargs) then
    me.patientId=me.openargs
end if

end sub
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 20383062

better to open the form in add mode

docmd.openform "frmVisit",datamode:=acformadd, openargs:= me.patientid
0
 

Author Closing Comment

by:Pdeters
ID: 31411926
worked wonderful!!!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now