Using Dlookup in a subform

gunny3000

Registered User.
Local time
Today, 01:27
Joined
Nov 3, 2010
Messages
31
Hello all,

I have a subform where I am trying to add select contact details from a table already built and assign those contacts to records in my main form. From when i select the contacts i want some of the other information to populate the other fields.

Should I actually try to read the original table back?

I've got all tied-up with something that appears to be simple.

I've been trying Dlookup functions in the other fields, but, it hasn't worked.
 
Include the data from the other table as the next level of subform.

Each DLookup is essentially a query so they are slow when used repeatedly. They should be avoided unless you are just retrieving a single value.
 
I'm not quite sure what you mean by "the next level".

Can you please explain?
 
Just a couple of questions for you and a statement.

1. Is this subform LINKED to the main form via Master/Child links?

2. If so, why are you trying to place something in the main form from the subform. That is backwards from the way subforms work.

The way subforms are normally used, you have a one-to-many or many-to-many relationship and you have the ONE side (or one of the many's if many-to-many) in the main form and then you have the MANY side (or other many side in many-to-many) in the subform. The subform has the CHILD records and the main has the PARENT records.

So, data flows from the Parent to the Children, but normally not vice-versa. So, what is your table structure and why is this set up the way it is?

Or are you using the subform as basically a LIST BOX and it is in no way linked to the records in the main form?
 
I have a Main Form which is for Change Management (Engineering). I have a Subform for the Sign-off Signatures required for that Change. However, I also have a Form to add contacts so in any part of the Main Form you can select from a ComboBox individuals name. For instance, if they own the Change etc. For the Sign-off section (Subform), I wish to call up names that populate each individuals name, company, role, etc, where there might be multiple names...

I don't think this sounds strange. It is selecting individuals for sign-off from already entered data. I just cannot workout how to populate their job roles, etc, based on a Subform. Hence, I was going to populate a new table linked to the Main Form (Change) from the Contacts data!
 

Users who are viewing this thread

Back
Top Bottom