DataChange event (1 Viewer)

jeannier1975

Registered User.
Local time
Today, 08:42
Joined
May 17, 2018
Messages
48
Im looking over an database that i have inheriated to reconstruct. i notice on form there is an event DataChange(ByVal Reason As Long) what does this do what is the purpose?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:42
Joined
Oct 29, 2018
Messages
21,478
Hi. I'm not familiar with that event definition. Are you sure it's an actual event? I am thinking maybe it's a custom subroutine created by the former developer.
 

jeannier1975

Registered User.
Local time
Today, 08:42
Joined
May 17, 2018
Messages
48
1588977372762.png
 

jeannier1975

Registered User.
Local time
Today, 08:42
Joined
May 17, 2018
Messages
48
no chart just a form trying to make scense of what it doing
Private Sub Form_DataChange(ByVal Reason As Long)
Me.Refresh
Me.Requery
End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:42
Joined
Oct 29, 2018
Messages
21,478
no chart just a form trying to make scense of what it doing
Private Sub Form_DataChange(ByVal Reason As Long)
Me.Refresh
Me.Requery
End Sub
Okay. I'm not in front of a computer right now, but I'll check once I am and I'll let you know. Which version of Access are you using?
 

Micron

AWF VIP
Local time
Today, 11:42
Joined
Oct 20, 2018
Messages
3,478
I think it is a form event, but involves a pivot table:

The event does nothing per se. It is the code that comes in between the start and end that matters. What you have shown is that the form gets refreshed, then requeried - which doesn't make sense to me. No point in doing the first if you're going to do the second as well.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:42
Joined
Oct 29, 2018
Messages
21,478
I think it is a form event, but involves a pivot table:

The event does nothing per se. It is the code that comes in between the start and end that matters. What you have shown is that the form gets refreshed, then requeried - which doesn't make sense to me. No point in doing the first if you're going to do the second as well.
Ah, no wonder I wasn't familiar with it, since I haven't tried using Pivot Tables in Access.
 

Micron

AWF VIP
Local time
Today, 11:42
Joined
Oct 20, 2018
Messages
3,478
Me neither. I just did what anyone else could do (yet it seems most don't) before posting - ask Mother Google. ;)
 

Users who are viewing this thread

Top Bottom