Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access VBA FORM: Sub has Array which I want to use in Module:Sub

Status
Not open for further replies.

03Explorer

Technical User
Sep 13, 2005
304
US
Using MS Access 365, I have an array established in a FORM subroutine. I am trying to use a MODULE Subroutine that utilizes the established Array. I have tried changing the type of FORM SUB to Public. No luck. I also tried changing the DIM statement in the FORM SUB to Public... again, no luck. I have the new Module SUBroutine set to Public... again, no luck. What am I missing?
 
How and where your Array is declared?

Did you try:[tt]
Call frmMyFormWithCode.SubRoutieNameHere()[/tt]

Two points here:
1. You may want to move your sub into a Module and declare the Sub As Public
2. There are several Access forums here at TT where your question should be asked


---- Andy

There is a great need for a sarcasm font.
 
Hi Andy,

I created a module within a form. That's where I created the Array and did all the logic to process it. I know I *should* have built this as a SUB into a Module (but that may take more time than build from where I am at). I am now working on moving some of the new code out into a sub into a Module.

I am somewhat a mix of new VBA programmer and a seasoned technical user... yeah, yeah :) that's another way of saying "You're a hack!" LoL...

Right, I should have noticed which thread I am posting this... my bad. thanks! I'll post there vs continuing here.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top