Combobox updating SubForm

SeBasTiaan

Registered User.
Local time
Today, 15:49
Joined
Jun 7, 2005
Messages
24
Hello guru's, I've searched the complete forum for the answer but I just can't find it. I've got a main form with 2 comboboxes on it. The first one filters the second one. What I need now is the 2nd combobox to filter the SubForm. I've tried to add a subform with the wizard but then it shows the complete table instead of only the ones selected in the second combobox.

I've got 3 tables: 1 for classes, 1 for students and 1 for the attendance.
The 1st combobox selects the class, the second one selects the student.
The 3rd table is used to enter absences (date, time, teacher etc) and it should appear in the subform when the student is selected.

Can anyone please give me a little advice? Thanks heaps in advanced! Sebastian.
 
Last edited:
Example

Hello, I've attached an example of my database. If you have a look at it, There's 2 forms, 1 called klas and one called Absentie.

In Klas there's how it works, you select a class in the first textbox, then you select a student in the second one and then you can enter the absence in the 3rd one.

In Absentie, I've made the layout how it SHOULD be, in the first combobox you select the class, in the next combobox you select the students in this class (I've got this one working) and then the absence of the selected student in Combobox 2 should be in the subform.

Please help! Thanks in advanced...
 

Attachments

Last edited:
SeBasTiaan, I have taken a look at your databse and have made the controls work the way you want them to. Note that I have set the Main form and the subform to obtain their records from a query. Doing this allows a simple refresh to trigger the subform records to change. I have also changed the defualt value for your number fields to 0 Decimal spaces and nothing for the default value, you had them set for Auto and 0. See the attached modified database.
 

Attachments

Tnx!!

That's allmost exactly what I want. Thank you very much. I'm trying to figure out where you selected the query for the main and subform. Where is this set?

Is there an easy way to add a record to the absentie table with the selected username in the combobox? When I add a record now, it's saved without the username. Thanks again for your help!

SeBasTiaan
 
Combo box updating subform

How can I do this for my database
CD Group CD NAme Populates records Select CD Group then cD NAme displays records associated with that CD Group
for the tracks I want it on the subform to go to the records associated with the tracks I tried relationships as cdautonumber and cd name cdautonumber cdtracks when I scroll through the records it works fine it changes the values with the cdnames not when I select them.

If I select the values for Record 1 it does the same 1 to 14 (All the records in the database)

Thanks

mikevds@optonline.net
I can ameil you a winzip file incase your lost on what I Am doing.
 
Found query

Hi, I found where the subform query is selected! Thanks heaps.

The only thing that I need to find out is how to update the autonumber so that he looks at my table instead of the query. Is this possible?

Tnx again! Sebastiaan
 

Users who are viewing this thread

Back
Top Bottom