R
redfox05
Regarding thread:
http://groups.google.co.uk/group/mi...read/thread/3d766ca25e88876c/1a479bd09f4d6315
Out of date, but for all those A Level students who would find this
useful it may help.
I used a hidden form to pass a control value.
But then changed it to use global variables, as according to the above
thread.
But, to display the variable I did it differently.
I used an Onload on the form itself, and included the following:
Private Sub Form_Load()
Me.TextField = globVariableName
End Sub
This worked much better, because using a function to call the variable,
as mentioned in the thread, caused a delay in the value appearing,
maybe a second or two, but still does not show up on the form straight
away.
But using VB to set the value directly made the value show up
immediately.
Only drawback is that you do have to set the value in VB code and not
in the dialog boxes in Access. (Or at least Ive not found that you can)
When using this method, you have to leave the Control Source for the
textbox empty.
Anyways, hope this helps. Im only new to using VB, but parts of my
Access project required me to use VB (one of which is this passing
variables example), so I have to learn a bit.
If im wrong in any of this, let me know, im only just beginning in VB.
Russell
http://groups.google.co.uk/group/mi...read/thread/3d766ca25e88876c/1a479bd09f4d6315
Out of date, but for all those A Level students who would find this
useful it may help.
I used a hidden form to pass a control value.
But then changed it to use global variables, as according to the above
thread.
But, to display the variable I did it differently.
I used an Onload on the form itself, and included the following:
Private Sub Form_Load()
Me.TextField = globVariableName
End Sub
This worked much better, because using a function to call the variable,
as mentioned in the thread, caused a delay in the value appearing,
maybe a second or two, but still does not show up on the form straight
away.
But using VB to set the value directly made the value show up
immediately.
Only drawback is that you do have to set the value in VB code and not
in the dialog boxes in Access. (Or at least Ive not found that you can)
When using this method, you have to leave the Control Source for the
textbox empty.
Anyways, hope this helps. Im only new to using VB, but parts of my
Access project required me to use VB (one of which is this passing
variables example), so I have to learn a bit.
If im wrong in any of this, let me know, im only just beginning in VB.
Russell