Split form variables not retaining value

tuna

Registered User.
Local time
Today, 16:11
Joined
Mar 31, 2010
Messages
27
Hi, is anyone else finding that form variables don't retain their value in split form mode? Is there anything that can be done? Thanks.
 
Need more info than that. How are you declaring them and where?
 
Thanks - I mean in all events that originate from the datasheet part of the split form fails to retain module-wide variables - i.e. if I have a hyperlink set on field Field1, something simple like this would fail to give the desired result:

Code:
Option Compare Database
Option Explicit

Private lngTest As Long

Private Sub Form_Load()

    lngTest = 5

End Sub

Private Sub Field1_Click()

   Debug.Print lngTest

End Sub

debug.print prints "0" - lngTest appears to evaluate to its default value despite being set during the on load event. Thanks.
 

Users who are viewing this thread

Back
Top Bottom