DKDiveDude
Registered User.
- Local time
- Today, 12:49
- Joined
- Mar 28, 2003
- Messages
- 56
Accessing table field from unbound form field?
Not sure that really is the best way to put the following problem, as a question, but here is my problem with simplified example tables and forms, which I never been able to easily solve it even with other databases:
Tables:
tblDepartment - Related to below user table (One to Many)
numDepartmentID
txtDepartmentName
tblUsers
numUserID
txtUserName
numDepartmentFKID
tblResources
numResourceID
txtResourceName
tblUsersXResources
numUsersXResourcesID
numUserFKID
numResourceFKID
Form:
frmResources
txtResourceName
Subform - Continuous Forms:
frmUsersXResources
numUserFKID - which looks up the user name
and here comes the part I can not figure out. On this subform I want to show and even be able to change/select the department name for this user. The problem is I want or at least tried to make a query that lookup up the department name of the user, but the problem seems to be that the user ID is on this subform (Continuous Forms), so I can't include this "field"/data in my query. Example:
numDepartmentFKID - which looks up the department this user belongs to
Remember the above tables is NOT the real database I am working with, where I have many more tables, and forms with subforms, with subforms etc. It is just a simplified example.
Let me know if I need to explain, or rephrase my self in more detail.
Thanks
Not sure that really is the best way to put the following problem, as a question, but here is my problem with simplified example tables and forms, which I never been able to easily solve it even with other databases:
Tables:
tblDepartment - Related to below user table (One to Many)
numDepartmentID
txtDepartmentName
tblUsers
numUserID
txtUserName
numDepartmentFKID
tblResources
numResourceID
txtResourceName
tblUsersXResources
numUsersXResourcesID
numUserFKID
numResourceFKID
Form:
frmResources
txtResourceName
Subform - Continuous Forms:
frmUsersXResources
numUserFKID - which looks up the user name
and here comes the part I can not figure out. On this subform I want to show and even be able to change/select the department name for this user. The problem is I want or at least tried to make a query that lookup up the department name of the user, but the problem seems to be that the user ID is on this subform (Continuous Forms), so I can't include this "field"/data in my query. Example:
numDepartmentFKID - which looks up the department this user belongs to
Remember the above tables is NOT the real database I am working with, where I have many more tables, and forms with subforms, with subforms etc. It is just a simplified example.
Let me know if I need to explain, or rephrase my self in more detail.
Thanks