Update a subform bassed when a combobox is changed. (1 Viewer)

mjones

New member
Local time
Tomorrow, 06:19
Joined
Jan 5, 2020
Messages
3
I have a form that consists of the main form with a subform that is a datasheet of invoice details for paying membership fees (Invoice Date, Amount, Membership Year etc.)) . What I want to happen is when I change the value of a Combobox on the main form, the subform displays only the invoices for the selected year (the MembershipYear field is just a number). I have modified the query that runs the subform (qryDisplayMembersFees) so that when I change the Combobox and re-run the query it works, but I can't get it to update the subform using the .requery command.

Thanks

Matt
 

Attachments

  • Acccess.zip
    90.9 KB · Views: 88

theDBguy

I’m here to help
Staff member
Local time
Today, 15:19
Joined
Oct 29, 2018
Messages
21,453
Hi Matt. Have you considered simply linking the subform to the combobox (in addition to the PK, of course)?

PS. Sorry, can't download your file right now.
 

bob fitz

AWF VIP
Local time
Today, 23:19
Joined
May 23, 2011
Messages
4,719
...........but I can't get it to update the subform using the .requery command.

Thanks

Matt
Can you show us the the code you are using.
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:19
Joined
Sep 21, 2011
Messages
14,231
Hi Matt. Have you considered simply linking the subform to the combobox (in addition to the PK, of course)?

PS. Sorry, can't download your file right now.
@theDBguy
I would not bother, it only contains
Code.JPG

and
form.JPG
 

Users who are viewing this thread

Top Bottom