473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Listbox in a continuous subform

4
Hey all!

I realise this must have been posted before, but I didn't find an answer by searching this site or the net. I'm hoping someone can tell me how to fix this, or can show me a different approach.

The Access db I'm making is for basic job scheduling. Every day has several jobs and each job can have different employees assigned to it. Basic tables are:
tblJobs, tblJobEmp, tblEmployees

tblJobEmp is the one providing the link between tblJob and tblEmployees. It has several records per job, linking JobID with EmpID. (So if three emps are assigned to a job this table has three records for that JobID)

On my main form, I show a listing of jobs on a selected date. The jobs are listed in a subform. Now I'd like to have a listbox (or anything else) per record in the subform showing the assigned employees to that job.
No matter what I tried, I keep getting the emps from the first job for every job or nothing at all.

So if anyone can give me a way to solve this (I'm thinking a listbox might not be the way to go) I'd appreciate it!

Thanks in advance,
Johan
Mar 31 '07 #1
4 1687
Rabbit
12,516 Expert Mod 8TB
Hey all!

I realise this must have been posted before, but I didn't find an answer by searching this site or the net. I'm hoping someone can tell me how to fix this, or can show me a different approach.

The Access db I'm making is for basic job scheduling. Every day has several jobs and each job can have different employees assigned to it. Basic tables are:
tblJobs, tblJobEmp, tblEmployees

tblJobEmp is the one providing the link between tblJob and tblEmployees. It has several records per job, linking JobID with EmpID. (So if three emps are assigned to a job this table has three records for that JobID)

On my main form, I show a listing of jobs on a selected date. The jobs are listed in a subform. Now I'd like to have a listbox (or anything else) per record in the subform showing the assigned employees to that job.
No matter what I tried, I keep getting the emps from the first job for every job or nothing at all.

So if anyone can give me a way to solve this (I'm thinking a listbox might not be the way to go) I'd appreciate it!

Thanks in advance,
Johan
What's the row source of the list box?
Mar 31 '07 #2
JohanV
4
I tried different things... Like running a query that filters out all Emps where the JobID matches... but it only does it once, which then is shown in every listbox for every record.
Mar 31 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Hi Johan

As I understand it you have a datasheet or continuous form as your subform of jobs in which you want to show a list of employees assigned per job.

The listbox or combobox row source will change depending on what record is in focus which is why it's changing for all records. You will need to create a further subform to show this list.

Mary
Apr 1 '07 #4
JohanV
4
Thanks,

I didn't manage to get it working (had no time left) because I had to show the prototype to the client today.
All turned out well tho and I can start in the real work.

Cheers
Johan
Apr 1 '07 #5

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

Similar topics

2
by: Simon P | last post by:
Hello group, I'm in desperate need of help. Here goes : I have the following tables : CONTACTS (ContactID, FirstName, LastName, Company, etc.), SHOWS (ShowID, ShowDescription) and SHOWDETAILS...
3
by: Paul T. Rong | last post by:
I have a listbox (of product names) control on my form. I want to pass the selected item (a product name) to a subform, and the product unitprice should apear automatically next to the product name...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
1
by: gavo | last post by:
Hello everyone! Using A2K i have a form(a) with a subform(b) and within the subform there is a continuous subform(c). in the subform (b) there is a command button used to call a public...
1
by: Beacher | last post by:
is there a way to add an item to a subform just like it were a listbox? I dont want it bound to anything, I just want to show data in it like a datagrid, because i really dont feel like formatting...
3
by: Typehigh | last post by:
I am a good programmer, but this one stumps me! I have a form with a continuous subform. The continuous subform contains records of data and may reach a depth of 1000's of entities. I have...
5
by: lorirobn | last post by:
Hi All, I have a listbox on a main form. When user double-clicks an item in the list box, I move the selected values to a subform at the bottom of the form. List box is not multiselect, and...
20
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of...
7
by: tonsam | last post by:
I am planning to create a form (Issuance) where all the records of the subform will be selected from the listbox. The listbox is not part of the main and subform but will only be visible upon...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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
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,...

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.