Problem with Access

B

ByB

Hello,

I am working in an apàplication written in VBA and running in Access,
and I get some problems related to Object Programming. Can somebody
give me a hint in these questions :

I would like to give a Form 2 parameters when loading it. I tried with
OpenArgs, but did not find the way to pass it 2 parameters : I tried to
create a class which contains the two parameters, convert it to a
Variant by the mean of CVar() and pass it to
Application.DoCmd.OpenForm, but I get an error message about type of my
variable.

So I tried the following way (assuming that F_MyForm is the name of the
form I created) :
- Added a Let property to the F_MyForm objet (SetMyParameter)
- Dim f as F_MyForm
- Set f = New F_MyForm
- f.SetMyParameter = 12
- f. ???
This the point : I tried to find a method to call to open a form this
way, but did not find any (I have tried f.open, f.Activate, f.Show,
f.Display etc, but always got error message). So is there a way to open
a form when created this way ?


Thank you for your answers, or for telling me how to pass 2 parameters
to a form, even by the mean of OpenForm ...
 
J

Jan De Messemaeker

Hi,

Sorry but isn't there a Newsgroup for Access VBA? This one deals with VBA
for Project..
Hope this helps,

Jan De Messemaeker, Project MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top