Passing a variable from a form to a subform

hangglide

Hangglider
Local time
Today, 07:45
Joined
May 9, 2001
Messages
35
I have a form with a button that when pressed assigns a value to a variable (and it does other other things on the form).

I would like to use that variable in a subform. Right now when I try to call it on the subform it is null. I am assuming that I have to make the variable public somehow. I read on other threads that I should use a module and declare the variable . Do you have any tips on how to do that?

TIA

Leo
 
Create a new Module


Option Compare Database
Option Explicit

Public MyNumb As Long
MyWrd As Text



etc

save it as something like

BasMy
 
Thanks Rich,
That worked great!

Leo
 

Users who are viewing this thread

Back
Top Bottom