473,465 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

listbox bound to a main form

51 New Member
I don't know if I can explain my question clearly.
There're three tables as Scholars, Grants, ScholarWIthGrants, the relationship between scholar and grants is 'many-to-many', and ScholarWithGrants is the joint table.

A scholar form is created, as main form. a listbox as 'grantList' is embedded into this main form. The data source for grantlist is bound to the scholarID on the main form.

SELECT sg.ScholarID, sg.GrantID, sg.Title, sg.GrantRole
FROM ScholarsWithGrants as sg
WHERE sg.StudentID = [scholars].[studentID]))

when the main form is on load, the grantlist displays the correct list for the first scholar. while using the navigation button at the bottom of the main form, the scholarID is moving on, but grantlist stays unchanged. don't know what event is with navigation button.

I understand I may use subform instead of listbox, and subform worked fine. But there're other purposes of using listbox, e.g. click on one listed records and others.

Please help... What shall I do for such a situation?
Thanks for any suggestions and helps........
Aug 8 '07 #1
2 1770
FishVal
2,653 Recognized Expert Specialist
I don't know if I can explain my question clearly.
There're three tables as Scholars, Grants, ScholarWIthGrants, the relationship between scholar and grants is 'many-to-many', and ScholarWithGrants is the joint table.

A scholar form is created, as main form. a listbox as 'grantList' is embedded into this main form. The data source for grantlist is bound to the scholarID on the main form.

SELECT sg.ScholarID, sg.GrantID, sg.Title, sg.GrantRole
FROM ScholarsWithGrants as sg
WHERE sg.StudentID = [scholars].[studentID]))

when the main form is on load, the grantlist displays the correct list for the first scholar. while using the navigation button at the bottom of the main form, the scholarID is moving on, but grantlist stays unchanged. don't know what event is with navigation button.

I understand I may use subform instead of listbox, and subform worked fine. But there're other purposes of using listbox, e.g. click on one listed records and others.

Please help... What shall I do for such a situation?
Thanks for any suggestions and helps........
Hi!

When you browse through the records, each time a record has been populated form Current event is triggered. Here you can populate your Listbox with a relevant records.
Aug 9 '07 #2
anniebai
51 New Member
Hi!

When you browse through the records, each time a record has been populated form Current event is triggered. Here you can populate your Listbox with a relevant records.
Thanks a million.
It worked at the first try.
Aug 9 '07 #3

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...
6
by: AAJ | last post by:
Hi all I have a listbox on a form. If I set its rowsource directly, and the query in the rowsourse returns no data, then the displayed listbox is empty (exactly as you would expect) ...
1
by: Herr Lukas | last post by:
hello I'm from germany - 1 form bounded at 1 tableI with IDaqi and IDarbG, ok, it' works. - the form is kind endless, not surprising - in the detail-section I want to built 1 listbox its...
6
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset...
3
by: PAPutzback | last post by:
I have a form that when it loads it fires off a second thread to load a datatable. This datatable contains a list of names and ids that the user may want to add to their criteria. So I have a...
7
by: Dave | last post by:
Hi all, After unsuccessfully trying to make my own dual listbox control out of arraylists, I decided to look for a 3rd party control. I've looked for over a week now and can't find anything but...
1
by: Spock | last post by:
Hi. I have a form with a listbox and a few label fields all bound to a dataset. When i navigate the listbox the labels change accordingly. so far everything works good. I made a button to...
10
by: ken | last post by:
Hi, Say I have a list box. I also created a control on a form bound to that list box. When I click different rows in the listbox the control changes the ID of the row depending on what I click. ...
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.