473,513 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtered and Multiple Lookups

1 New Member
I'm really not very good at access, so this will probably be a sinch for most of you

I have a form with one of the inputs as a lookup. For the sake of an explanation I'll call this lookup the "Department" field

I would then like the next two lookups to look to a table which contains Employee first and last names, for example and the departments which they belong to. I would like the lookup to only show the fields of people who belong to the department which has already been chosen by the first lookup, and then by making only one selection, put two different values (first and last name) in two different columns.

If anyone can help a beginner it would be great!!!
Oct 29 '08 #1
1 1115
puppydogbuddy
1,923 Recognized Expert Top Contributor
I'm really not very good at access, so this will probably be a sinch for most of you

I have a form with one of the inputs as a lookup. For the sake of an explanation I'll call this lookup the "Department" field

I would then like the next two lookups to look to a table which contains Employee first and last names, for example and the departments which they belong to. I would like the lookup to only show the fields of people who belong to the department which has already been chosen by the first lookup, and then by making only one selection, put two different values (first and last name) in two different columns.

If anyone can help a beginner it would be great!!!
See if this is what you wanted.

Tables>Dept, Employee
Lookups are comboboxes >cboDept, cboEmployee

Assumes that DeptNo and EmployeeNo are both text data types

cboDept>DeptAutonumber(Bound Column(0)-Hidden), DeptNo, DeptName

Expand|Select|Wrap|Line Numbers
  1. cboDept.RowSource = "Select * From Dept"
cboEmployee>EmplAutonumber(Bound Column(0) Hidden), EmployeeID, FirstName, LastName, DeptNo

Expand|Select|Wrap|Line Numbers
  1. cboEmployee.RowSource = "Select * From Employee Where DeptNo = '" & Me!cboDept.Column(1) & "'"

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboEmployee_AfterUpdate()
  2. cboEmployee.RowSource = "Select * From Employee Where  EmployeeID = '" & Me!cboEmployee.Column(1) & "'"
  3. Me!txtFirstName.Value = cboEmployee.Column(2)
  4. Me!txtLastName.Value =  cboEmployee.Column(3)
  5. End Sub
Oct 31 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
7454
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
2
3220
by: Seth | last post by:
How can I hide an entire row of a table if one of the cells in that row is equal to a value drop down box value. My goal is to have a filtered table so that each cell in each row determines if...
3
1670
by: dbaxter7 | last post by:
OK, here's my dilemma. I am trying to create a system to track cases and clients. There are instances when cases have multiple clients, and there are instances where clients have multiple cases. ...
1
1446
by: Russell | last post by:
Hi, I've been reading a lot about not using lookups in tables lately. Thus far, what I've been able to understand from my reading is this: - Do not use lookup fields in tables because they...
6
4419
by: Quiet Man | last post by:
Hi all, I'm designing a fairly simple service that will run on W2K/SP4 and W2K3 servers. It's job is to be a very specialized database server that listens on a given IP address / TCP port and...
5
4028
by: Livin | last post by:
I'm a noobie so please be easy on me. I have searched a ton and did not find anything I could understand. I'm using py2.3 I've been using Try/Except but this gets long with multiple...
7
4174
by: Randy | last post by:
Folks: We have a web-based app that's _really_ slowing down because multiple clients are writing their own private data into a single, central database. I guess the previous programmer did...
3
3435
by: melnhed | last post by:
---Report the current filtered records from a Form--- Hello All, I've seen this topic discussed before, but the solution described then doesn't work in my particular case. My Config: ...
6
1946
by: Nettle | last post by:
Purpose: I am creating a mailing distribution list database. Users should be able to filter/search contacts and add them to distribution lists they have created. My problem? I can't add multiple,...
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7543
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7106
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7534
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.