Ctrl to add new record in subform based on info in Main form

L

LeAnne

Gurus, please help! I’m struggling to accomplish a task that seems to be me
should be fairly straightforward. I won’t say my job hangs in the balance,
but I am under intense pressure to resolve this.

In my database (Candidate Project Evaluations), Project Sites are related
1:m to Projects. I have a form, frmEnterNewProjects, which is the Main data
entry form and displays site info filtered by location. This form contains a
subform, sfrmProjectEval, which is used to enter project information for a
site, including Project Number (a unique alphanumeric ID assigned by the
user). The master/child field is Site_ID. sfrmProjectEval is invisible and
disabled until the user clicks a control button on the Main form to enable (&
make visible) the sfrm. The sfrm also contains a sub-subform,
sfrmProjectSurvey, linked to sfrmProjectEval on Proj_ID. This form is
invisible and disabled until the user enters a Project Number and clicks a
ctrl on the sfrm; this runs an append query which “loads†survey questions
for the project and makes the sub-subform visible (& enabled). The intention
is for the user to complete the entire data entry process for a project
(enter site info/click ctrl to save site data and show sfrm/enter Project
Number for this site/click ctrl to load questions & show sub-subform/take
survey) before moving on. At the bottom of the MAIN form, there is a series
of buttons to enable the user to either enter a new site for the (filtered)
location (new record in MAIN form), enter a new project for the same site at
the (filtered) location (new record in SUBFORM), or exit the data entry form.


Everything seems to be working EXCEPT for the “Enter a New Project for this
Site†ctrl button. I’ve tried Me!sfrmProjectEval.Requery; I’ve tried

DoCmd.GoToControl "sfrmProjectEval"
DoCmd.GoToRecord , , acNewRec

…plus numerous other permutations, to no avail. sfrmProjectEval is based on
an updateable query, and the AllowAdditions property is set to Yes. I have
hidden the navigation buttons on sfrmProjectEval to “force†the user to
follow the complete data entry process. However, if I unhide them, they are
not greyed out, so I should be able to enter a new Project in the subform. I
just can’t seem to find the right procedures. ANY assistance at all would be
GREATLY appreciated!!

Tia,

LeAnne Asrin
Ecologist
Fairfax County Stormwater Planning Div.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top