Advertisement

07.17.2008 at 07:13PM PDT, ID: 23575603
[x]
Attachment Details

Fill Form Values with DLookup

Asked by codequest in Microsoft Access Database

I've got tables with parent child relationships

Organization
   Project
      Milestone
         Action

I've got a form Actions that lists mostly Action detail, with some Project & Milestone identifier info

ProjectTitle    MilestoneTitle    ActionTitle  OtherAction Detail

where ProjectTitle and MilestoneTitle are provided from a query that does joins to get those
fields from the associated Project and Milestone tables.

I want to add to Action table through this form.  So I need to tell it which Milestone record.

So I have a ComboBox with ProjectID that allows me to lookup and change the ProjectID on the form, and then OnChange to use DLookup to change the ProjectTitle field.  Same for MilestoneID/MilestoneTitle with MilestoneID constrained to children of that ProjectID.

The problem is that when I try to use this scheme to add an Action record, it says "can't do it, no organization record".   So it's acting like it wants to add a Project record.  

I suspect this must be because the form record source has the joins to the Project record, and the combo box field for ProjectID has ControlSource from that query.   Or something.

I want to be able to fill ProjectTitle and MilestoneTitle properly for existing Action records.

I also want to be able to select ProjectID and MilestoneID (and display corresponding Titles) for add Action records, using the "combo box ID lookup" + "on change Title Dlookup" mechanism above.   I've done this in other apps, but it was too long ago...

==> OR   do I have to build a little "add record" form in the footer, get the projectId, milestoneid there, add the Action record, get the last record, use it as a bookmark, then go fill in the new record?

Any help with this would be appreciated.

Thanks!Start Free Trial
 
Keywords: Fill Form Values with DLookup
 
Loading Advertisement...
 
[+][-]07.18.2008 at 02:42AM PDT, ID: 22034091

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Sign Up Now!
Solution Provided By: koutny
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.18.2008 at 06:42AM PDT, ID: 22035646

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.06.2008 at 04:36PM PDT, ID: 22176302

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628