When you choose a year in the form fill in the right records

knoet

New member
Local time
Today, 07:43
Joined
Mar 5, 2020
Messages
16
I have a form, when you choose a year in the combobox, how to fill the right records in the form?
 

Attachments

I have a form, when you choose a year in the combobox, how to fill the right records in the form?
Hi

Your 1 table is not normalised as it contains Repeating Groups.

The fields listed below should be Records in a Related Table and not fields in this table.
USENET
USENETbegindatum
USENETeinddatum
USENETlogin
 

Attachments

  • Repeating Groups.png
    Repeating Groups.png
    22.3 KB · Views: 48
knoet,

Can you step back and tell us a bit about your database application? Not only do current readers need some context in order to offer focused advice, but anyone reading this post in future would be "lost/confused" without some additional descriptive material.
What is/are "right records? Sometimes adding some detail to your post will help clarify things for you and readers.
 
I agree with Mike, you need to rethink the table design and normalize it. That means that rather than the lovely column layout, you will have a list with each set of credentials on a separate row. But to make the form work:

1. Add an unbound control to the form's header. As the rowSource, create a query that selects Jaar from the table and group by it. That presents a list of the years.
2. Add a where clause to your form's RecordSource query. Where Jaar = Forms!FABOS!cboSearchJaar
3. In the Click event of the combo add a requery --- Me.Requery
 
you try this Abo
 

Attachments

@arnelgp You are always ready to jump in and do the changes for the poster which is very generous but sometimes it is better to just let the poster try to follow the explicit directions. Most people learn better by doing.

Also, you might want to fix your sample. You hid the bound year field so it won't be possible to add new records and as you scroll, you can't tell what record you are looking at.
 
You hid the bound year field so it won't be possible to add new records and as you scroll,
the original form does not have the Year field on it, i just added it.
on the BeforeInsert event, i set the Year field to the value of the combo.
 
You are justifying. The form is allowed to scroll. When you scroll, how can you tell what the year is?

Here's my version.
 

Attachments

Last edited:
Sorry, I just seen your answers, I never got a noticifation in my mail.
I wil study your anwers.
 

Users who are viewing this thread

Back
Top Bottom