• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 622
  • Last Modified:

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

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
Pdeters
Asked:
Pdeters
  • 2
1 Solution
 
Shanmuga SundaramCommented:
yes. you can do. try coding via vba.
0
 
Rey Obrero (Capricorn1)Commented:
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
 
Rey Obrero (Capricorn1)Commented:

better to open the form in add mode

docmd.openform "frmVisit",datamode:=acformadd, openargs:= me.patientid
0
 
PdetersAuthor Commented:
worked wonderful!!!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now