AfterUpdate Not working

Optimistic

New member
Local time
Today, 16:50
Joined
Dec 30, 2010
Messages
2
Hi everyone,

First I'm new to programing and access and struck a problem.
I'm trying to pass variable on a AfterUpdate eventfrom a textbox in one form to a textbox in a sub form using TemVars. But nothing happens. But if I use the click event in on the text box it works fine.

Can someone please tell me why it does not work on the AfterUpdate event

Here is the code

Dim Roll As String

Private Sub RollID_AfterUpdate()
Roll = RollID
Text56 = Roll 'this is tempoarry to check if the value is passed
TempVars.Add "strRollID", Roll
End Sub

Private Sub RollID_Click()
Roll = RollID
Text56 = Roll 'this is tempoarry to check if the value is passed
TempVars.Add "strRollID", Roll

End Sub

your help is much appriciated.

Optimistic
 
I do something simular except I use the system user id then keep a table with thier userid and role. This makes it easy and I don't have to keep the user id. If you do need to keep the user id you could declare it as public in a module and then it will become available to your whole application. I didn't find any information saying TemoVars are global or local. but here is a site that says you need to remove them after use.
http://msdn.microsoft.com/en-us/library/ff821458.aspx
 
Thanks both of you for your help, it is much appriciated

I ended up using the Parent property it works like a charm

Thanks again
 

Users who are viewing this thread

Back
Top Bottom