Solved Refresh Subform (1 Viewer)

Gr3g0ry

Registered User.
Local time
Today, 08:27
Joined
Oct 12, 2017
Messages
163
can i refresh a subform from OnChange of combobox ? if so, how can i achieve that ? please and thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:27
Joined
Oct 29, 2018
Messages
21,473
You can use either Refresh or Requery. Which one did you try?
 

Gr3g0ry

Registered User.
Local time
Today, 08:27
Joined
Oct 12, 2017
Messages
163
You can use either Refresh or Requery. Which one did you try?
i tried none.
so how would i do this ? would i just use formname.requery in the OnChange of the combobox ?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:27
Joined
Oct 29, 2018
Messages
21,473
i tried none.
so how would i do this ? would i just use formname.requery in the OnChange of the combobox ?
If the Combobox is also on the form you want to refresh, you could simply try:

Me.Refresh

or

Me.Requery

If you already have any code in the Change event, could you please post it? Thanks.
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 01:27
Joined
Jan 20, 2009
Messages
12,852
The difference between Refresh and Requery is important.
Refresh only get the updated values in the already loaded records.
Requery reloads the RecordSource so includes new records and reflects any changes to the query and its parameters.
 

Micron

AWF VIP
Local time
Today, 11:27
Joined
Oct 20, 2018
Messages
3,478
...and requery also brings you back to the first record. Can be bothersome if you wanted to stay, say, 200 records down in a datasheet or continuous form.
 

Gr3g0ry

Registered User.
Local time
Today, 08:27
Joined
Oct 12, 2017
Messages
163
If the Combobox is also on the form you want to refresh, you could simply try:

Me.Refresh

or

Me.Requery

If you already have any code in the Change event, could you please post it? Thanks.


frmPartnerDraws.Requery
frmPartnerPayments.Requery

i put these in the AfterUpdate event and they work just fine
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:27
Joined
Oct 29, 2018
Messages
21,473
frmPartnerDraws.Requery
frmPartnerPayments.Requery

i put these in the AfterUpdate event and they work just fine
Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom