f



How to call a function located in a form module (form open in form view) from an Access Basic global module?

I would like to call a function stored in a form module
in Access 2.0 from an Access 2.0 procedure in a global
module.

Function EmailTheOutletters () in module AppSpecific...
....
560  SSNtext = SelectRandomSSNtext(SSN)
....
End Function

SelectRandomSSNtext() is the procedure in the form module.
I would use the syntax shown in line #560 if I were calling the
function from within another procedure inside the form module.
Do I have to reference it any differently if calling it from outside
the form module?
0
CRCI (2317)
4/10/2005 4:59:07 AM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

2 Replies
836 Views

Similar Articles

[PageSpeed] 13

I don't think this is possible with Access 2.0
Solution: Put your function in a global module, and you can access it =
from everywhere.

--=20
Hope this helps
Arno R


"MLH" <CRCI@NorthState.net> schreef in bericht =
news:53ch519mm1rhbojc8e8sav99t24v5roufm@4ax.com...
>I would like to call a function stored in a form module
> in Access 2.0 from an Access 2.0 procedure in a global
> module.
>=20
> Function EmailTheOutletters () in module AppSpecific...
> ...
> 560  SSNtext =3D SelectRandomSSNtext(SSN)
> ...
> End Function
>=20
> SelectRandomSSNtext() is the procedure in the form module.
> I would use the syntax shown in line #560 if I were calling the
> function from within another procedure inside the form module.
> Do I have to reference it any differently if calling it from outside
> the form module?
0
4/10/2005 10:47:24 AM
<snip>
>I don't think this is possible with Access 2.0
>Solution: Put your function in a global module, and you can access it from everywhere.
xxxxxxxxxxxxxxxxxxxxxxxxxxx
yes, I did that as  work-around. It'll have to be
a permanent fix, I believe.
0
CRCI (2317)
4/10/2005 4:40:49 PM
Reply:

Similar Artilces:

form access to form excel
Hello, How may I pass in VBA a value from a control in a access 2003 form to a control in a excel 2003 form ? I try this but it does'nt run: (oApp=word.application) oApp.Forms("saisie").tbnom.Value = Form_Form1.tbnom.Value & " " & Form_Form1.tbprenom.Value Thanks. ...

Forms question
Hi folks, I'm new here and am a neophyte Access 2000 user/developer. A year ago, I barely knew what Access was. I was asked by the people that pay us to begin keeping certain data about the children's crisis program I manage. After a couple of years doing this by hand on paper (Yikes!), I decided that this was ridiculous. Out of neccessity, I had to learn Access and develop a database to track clients and services. So what I know, I've learned from places like this and from the many text books I've picked up. I developed the database and entered almost 3 years of data. We av...

Access Form --> Hyperlink to Excel --> Return to Original Access Form ?
I have an Access 2000 form that has a Hyperlink that opens an Excel 2000 worksheet located in the same network folder as the Access MDB. The Hyperlink works great. When users close the Excel File, they must choose the correct open Access form on the Windows Desktop Taskbar to return to the Access form that had the Hyperlink. Is there a way to: 1. Open the Access Form 2. Launch the Hyperlink to the Excel Workbook 3. Exit Excel, then 4. Return to the original Access form automatically - without clicking anything (such as the the TaskBar) I just need help with #4. Or, is there a better way to do this? Thanks John John wrote: > I have an Access 2000 form that has a Hyperlink that opens an Excel > 2000 worksheet located in the same network folder as the Access MDB. > > The Hyperlink works great. > > When users close the Excel File, they must choose the correct open > Access form on the Windows Desktop Taskbar to return to the Access form > that had the Hyperlink. > > Is there a way to: > > 1. Open the Access Form > 2. Launch the Hyperlink to the Excel Workbook > 3. Exit Excel, then > 4. Return to the original Access form automatically - without clicking > anything (such as the the TaskBar) > > I just need help with #4. > > Or, is there a better way to do this? > > Thanks > John > See if the code at http://www.mvps.org/access/api/api0018.htm works better. Thanks for the response. I wi...

Hiding Access Main Form/tables/queries/forms/etc
Thank you in advance for any and all assistance. Is there a way to hide the Main Access window with tables, queries, forms etc programmatically? Michael On Sat, 17 Jan 2004 17:17:16 -0600, "PMBragg" <pmbragg@megavision.com> wrote: >Thank you in advance for any and all assistance. > >Is there a way to hide the Main Access window with tables, queries, forms >etc programmatically? > Yes. Take a look here for some API code that will manipulate the Access window. http://www.mvps.org/access/api/api0019.htm - Jim Another way, with probably less control than the...

Making MS Access Form as a standalone form like in VB
Well, its sames difficult for me; I love access so much and wish to make it perform extra task. I prepared an HTML form but can not connect it to my access table and so I think it is possible to make an access form a standalone form for user input. Can anyone assist. My mail add is dianafather@aim.com. *** Sent via Developersdex http://www.developersdex.com *** Oscar, why don't you just code up a VB form for user input and connect it to an Access backend? To my knowledge, you can't force an Access form to exist outside of Access. Your users would have to open the Access file to enter data, no matter how you set up the Access form. On Tue, 20 Dec 2005 11:35:09 GMT, Oscar N. Goyee <dianafather@aim.com> wrote: It's poor newsgroup practice to ask for email responses. Unlike what Steve said, you can create a form that lives outside of the Access main window: make it a popup. There is also nifty code out there (google for it), that puts the Access main window behind that popup, and moves it with it when it moves. To the end user it appears you have a single-form application. -Tom. >Well, its sames difficult for me; I love access so much and wish to make >it perform extra task. I prepared an HTML form but can not connect it to >my access table and so I think it is possible to make an access form a >standalone form for user input. Can anyone assist. My mail add is >dianafather@aim.com. > > > >*** Sent via Developersdex http://ww...

Forms and Form
Hi everyone ! 1) An example from help: "Each Form object has a Controls collection, which contains all controls on the form. You can refer to a control on a form either by implicitly or explicitly referring to the Controls collection. Your code will be faster if you refer to the Controls collection implicitly. The following examples show two of the ways you might refer to a control named NewData on the form called OrderForm: ' Implicit reference. Forms!OrderForm!NewData ' Explicit reference. Forms!OrderForm.Controls!NewData The next two examples show how you might refer to a ...

Accessing data from one form from main form in Visual Basic 6
How do I extract data from a form into the main form for processing? For instance, I have several image files in a form called images(images.frm), indexed from 0 to 99, and I want to import these into a variable array in my main form, main (form1.frm). How do I code a control to get these images into an array in my main form from the images.frm? TIA JC wrote: > How do I extract data from a form into the main form for > processing? For instance, I have several image files in a > form called images(images.frm), indexed from 0 to 99, and > I want to import these into a variable...

Form size question with Access forms, remote desktop, and MS Surface Pro
Hi, I know this is a stretch to ask this question, but: We have an Access 2010 application hosted using Remote Desktop. When we access forms from the desktop they look like they should. And from an iPad. However, a client is using their Surface Pro the forms are so tiny that she can't use them when accessing our application "on the cloud". Otherwise, they look fine on a Surface Pro when running it off the cloud. Does anyone have an idea? I do not think there is anything that the people that are hosting our software can do. -paulw On Monday, 29 February 2016 17:30:11 UTC, PW wrote: > Hi, > > I know this is a stretch to ask this question, but: > > We have an Access 2010 application hosted using Remote Desktop. When > we access forms from the desktop they look like they should. And from > an iPad. However, a client is using their Surface Pro the forms are > so tiny that she can't use them when accessing our application "on the > cloud". Otherwise, they look fine on a Surface Pro when running it > off the cloud. > > Does anyone have an idea? I do not think there is anything that the > people that are hosting our software can do. > > -paulw It will cost you, but have a look at a program called "ShrinkerStrether from Peter's Software (http://www.peterssoftware.com/ss.htm) This should shrink or stretch forms and all their controls to match the scr...

ACCESS accessibility from a C++ process launched from an ACCESS form
Here is my problem. From an ACCESS form, I run a C++ process reaching the same database in read/write mode via the ODBC driver. An error occurs: " The database has been placed by an unknown user in a state preventing it from being opened either locked. SQLSetConnectAttr failure of the pilot " (Nota : translated approximatively from the french error message). However, if I have used an another form before (eg. to modify a table), or if I have modified myself a record of any table, there is no problem. It seems that the database is in a state " read-only " by default until th...

Accessing a variable from a form in a module (VB6)
Hello, As you may guess, I'm not a very experienced VB6 programmer... However, I feel this should be easy to do... but it just doesn't work. At the beginning of the "code" in a form (MyForm), I declare a variable: '---- MyForm ------- Dim MyArray() as string Later in this form, I put some value in the array. Then, in a separate module (MyModule), I would like to acces the values from MyArray... '--- MyModule ------ Dim NewArray() as string NewArray = MyForm.MyArray It doesn't work... I get the following error message when I execute th...

Accessing the Created Instance of a form in my modules
Hello, I need to create a single (new) instance of a FORM and have that instance available to be called from my modules and some other forms. This is how I launch it, from <FormAnyform> Option Explicit Dim WithEvents frmNew as myExistingForm --------------------------- Private Sub InitializeNewStuff() Set frmNew = New frmSomething frmNew.Hide End Function I can't use frmSomething.Show, as I normally do and need to create an instance (to work with a UserControl and Events) but now I cannot access frmNew form my modules... For example frmNew.Caption="Hello" cannot happen as frmNew is not "public". If I try frmSomething.Caption="Hello" then I launch a NEW, second instance of frmSomething.... this is bad. How can I set frmNew to a Global so I can just use frmNew after it is created throughout my program? Thanks -stone because of a UserControl and requirement of RaiseEvents) "Stone" <x@y.com> wrote in message news:t4Feb.38$oX5.326558@news4.srv.hcvlny.cv.net... > Hello, > > I need to create a single (new) instance of a FORM and have that instance > available to be called from my modules and some other forms. This is how I > launch it, from <FormAnyform> > > Option Explicit > Dim WithEvents frmNew as myExistingForm > --------------------------- > > Private Sub InitializeNewStuff() > Set frmNew = New frmSomething > frmNew.Hide > End Function > &...

Forms/Subforms in MS Access Database
Why do my Forms/Subforms in my MS Access Database not appear? All I see is the boxes where they should show?! What did I do wrong? Thanks, John zufie wrote: > Why do my Forms/Subforms in my MS Access Database not appear? > > All I see is the boxes where they should show?! > > What did I do wrong? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Probably there isn't a name of a form in the sub-form's Source Object property. Also, the Link Child Fields and the Link Master Fields properties may be blank - you must enter the names of the link fields, they hold the field names that link the data between the forms. -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) ** Respond only to this newsgroup. I DO NOT respond to emails ** -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBSSsUjoechKqOuFEgEQL+dQCfYUSwXFtPj0RRSZO+q3J8lQCD0/UAniRz JKu0h9AG0BAg8W3wC/0BC7B3 =Kvva -----END PGP SIGNATURE----- On Nov 24, 2:54=A0pm, MGFoster <m...@privacy.com> wrote: > zufie wrote: > > Why do my Forms/Subforms in my MS Access Database not appear? > > > All I see is the boxes where they should show?! > > > What did I do wrong? > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Probably there isn't a name of a form in the sub-form's Source Object > property. =A0Also, the Link Child Fields and the Link Master Fields > properties...

Access crashes when opening form in design view
Stop me if you've heard this, but I am running Access 2002 and all of a sudden, if I design a particular form (it's been working fine for ages), Access crashes rather than open it in design view. Interestingly, it doesn't crash if I run the app and open it in form view! Just if I attempt to design it. If I compact/repair, it allows me to design the form once. On any subsequent attempts to view in design mode, though, it crashes before anything displays. After a lot if hair-tearing, I found that I had made a change to a field name in a table, and not updated a query that used it....

Opening MS Access forms from within PDF
I saw a lot of resources for creating and linking to a PDF document from within Access all over the internet. I would like to know if it is possible to accomplish the inverse task of hyperlinking from a PDF document such that the hyperlinks would open up MS Access forms. I see a use for such a thing for documentation purposes. Any suggestions? Prassu ...

Opening MS Word File from Access Form
I have an Access application where it would desirable to open a word file directly from an Access Form. I have been able to open the Word application, but I have not been able to have it open with the desired file. Any help or sample code would be appreciated. In your table, create a field for hyperlinks. Populate that field accordingly and make it available on the approriate form. -- Dean Covey www.coveyaccounting.com MS-Office Certified: http://www.microsoft.com/learning/mcp/officespecialist/default.asp "Tony Schoeffler" <Hugh.A.Schoeffler@lerc.nasa.gov> wrote in mes...

Determining whether an open form is being displayed in form view?
I use the following in A97 to tell if a form is open: If IsNull(TheForm) Then Exit Function IsFormOpen = SysCmd(acSysCmdGetObjectState, acForm, TheForm) Is there a way I can tell if it is open in Form View? Test the CurrentView property of the form. 1 is Form view. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "MLH" <CRCI@NorthState.net> wrote in message news:lj759251fubti2nrlv59et5rsji2q2frbv@4ax.com... >I use the following in A97 to tell if a form is open: > > If IsNull(TheForm) Then Exit Function > IsFormOpen = SysCmd(acSysCmdGetObjectState, acForm, TheForm) > > Is there a way I can tell if it is open in Form View? On Fri, 16 Jun 2006 20:28:04 +0800, "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote: >Test the CurrentView property of the form. >1 is Form view. I tried this ===> Dim frm As Form Set frm = Forms(frmCreateInvoice) If frm.CurrentView <> 1 Then MsgBox "frmCreateInvoice is not displaying in form view" End If Worked great. Thanks! ...

Difficulty displaying graph in Form View that I see fine in graph control on form opened in design view
A97 Am having difficulty displaying graph in Form View that I see fine in graph control on form opened in design view. I know I'm doing something wrong. If I open the form in design view - I see the graph in the graph control. If I dbl-clik the graph control, microsoft graph opens and displays the graph fine there too. But for some reason, it doesn't display in form view. The only thing that does display is the Chart Title (microsoft graph). The only control on the form is the graph control. MLH wrote: > A97 > > Am having difficulty displaying graph in Form View that I see fine > in graph control on form opened in design view. I know I'm doing > something wrong. The view you see in design is just a sample or snapshot or a previous state of the graph. When you open the form it will load the graph with whatever data you've linked it to. > If I open the form in design view - I see the graph in the graph > control. If I dbl-clik the graph control, microsoft graph opens and > displays the graph fine there too. See above. The graph's datasheet is separate to the recordsource in access. It's likely a saved copy of a previous state of the graph. When you load up a graph the datasheet will reflect the data in your recordsource but the datasheet isn't necessarily saved with this data. > But for some reason, it doesn't display in form view. The only > thing that does display is the Chart Title (microsoft graph). ...

Lock Access Form Open on screen with no access to start button or task bar
I have an access database that employees are going to use to sign in and ou= t. Because it is sitting at the front desk, I want it to block access to a= nything else on the screen (taskbar, start button). The only thing that sh= ould appear is the log in/out form from the database. I'm sure I'm not the first person that has needed to do this and a web sear= ch has turned up nothing. Has anyone done this before? How? Thanks in advance, Laura musicloverlch has brought this to us : > I have an access database that employees are going to use to sign in and out. > Because it is sitting at the front desk, I want it to block access to > anything else on the screen (taskbar, start button). The only thing that > should appear is the log in/out form from the database. > > I'm sure I'm not the first person that has needed to do this and a web search > has turned up nothing. > > Has anyone done this before? > > How? > > Thanks in advance, > Laura You are assuredly not the first. Unless you want to spen a ton of time plugging all of the holes (Ctrl/Alt/Delete is realy a PITA especially on Vista and later to plug, not to mention just pulling the plug and restarting) AND still leave yourself with a back door to gain access to the dam thing again. My Advise Google "Kiosk Mode" software, there is likely a tone of it out there for not much money. Rdub On Wed, 1...

Form to Open Another Form
This is very basic, but here goes, from a form, I want to pass parameters to a query to open another form (form by query?). Using a combo box to select a certain field works ok. But I am having trouble passing those fields which are check boxes. Get "data mismatch". The fields in the underlying table are 'yes/no'. ...

A97
At any point in time, I may have a number of open forms. Some may be opened in design view and some in form view. Those in form view may or may not be visible. That is, some may be hidden. I'd like to get a count of open forms currently opened in Form View. I do not wish to count any of the forms that may be open in Design View. What's the best approach for doing so? The Forms collection contains all of the currently open forms in a Microsoft Access database. Is there some subset collection of just those forms opened in Form View? Thx. On Sun, 22 Feb 2009 15:26:10 -0500, MLH wrote: > At any point in time, I may have a number of open forms. > Some may be opened in design view and some in form view. > Those in form view may or may not be visible. That is, some > may be hidden. > > I'd like to get a count of open forms currently opened in > Form View. I do not wish to count any of the forms that may > be open in Design View. What's the best approach for doing > so? The Forms collection contains all of the currently open > forms in a Microsoft Access database. Is there some subset > collection of just those forms opened in Form View? > > Thx. Copy and paste this IsLoaded function into a module (Note: it may be that this function has already been added to your database). Function IsLoaded(ByVal strFormName As String) As Integer ' Returns True if the specified form is open in Form view or ' Datasheet view bu...

Calling AfterUpdate and OpenArgs in Opening a Form from within another Form
Hi there, I am trying to call the afterupdate event for a combobox in an editing form from the double-click event of a combobox in a first, non-editing form, and get r-t error 2465. Argggg! Private Sub cboClients_DblClick(Cancel As Integer) DoCmd.OpenForm "frmSelectClients", acNormal, , , , , Me.cboClients Forms.frmSelectClients.cboClientsSelect = Forms.frmSelectClients.OpenArgs Call Forms.frmSelectClients.cboClientsSelect_AfterUpdate I am trying to use the open args only if users double-click the combobox in the non-edit form; I have a cmdbutton for Add a new record which opens up the editing form to a new rec. The 2 unbound comboboxes: cboClients, and cboClientsSelect The reason is because I cannot do the openargs in the on open event of the editing form--in order to add new records and have the comboboxes work. Your help would be so greatly appreciated. Thanks, Eric in frmSelectClients, try changing the combo control's AfterUpdate procedure from Private Sub cbo... to Public Sub cbo... hth "Arnold" <ericarnold1@yahoo.com> wrote in message news:1187556978.715547.276790@x35g2000prf.googlegroups.com... > Hi there, > I am trying to call the afterupdate event for a combobox in an editing > form from the double-click event of a combobox in a first, non-editing > form, and get r-t error 2465. Argggg! > > Private Sub cboClients_DblClick(Cancel As Integer) > > DoCmd.OpenForm "frmSelectClients&qu...

Open Form in Ms-Access from a hyperlink by using dhtml control
Hey ! I'm having a little ms-access application problem. in form A I have a dhtml control which I'm trying to assign it's documentHtml property a html string. I want that the html string will contain a hyperlink which open another form in access. Can I do that ? David ...

how can I open table in mdb access database without running form
Hi, I am trying to open mdb file to view tables in it but when I open mdb file it run form in it by itself, as a startup point. Can anyone please tell me how to view and change in tables and forms, where I am unable to open them. Thanks in anticipation. Kid. programmerKid wrote in message <1122015674.736582.3110@o13g2000cwo.googlegroups.com> : > Hi, > I am trying to open mdb file to view tables in it but when I open mdb > file it run form in it by itself, as a startup point. Can anyone please > tell me how to view and change in tables and forms, where I am unable > to open them. > > Thanks in anticipation. > > Kid. If this is something you're doing once or twice, to work with, then you should be able to do so holding the Shift key down while opening the database (unless the developer has disabled it). Also, if it's not disabled, hitting F11 while in the database, should bring the database window. Opening a new form on startup, is usually done through a setting in the Tools menu - Startup, or through an AutoExcec macro. -- Roy-Vidar ...

Word form can link to Access db, as a data entry form?
Is it possible to create a Word form as the data entry form for an Access database? I didn't see any reference to this possibility in my Access books, so I'm sorry if this is a question that is rather off-the-wall. I was asked to ask this question, to see if a Word form can be linked to an Access database and then emailed to various end-users for them to complete task requests using this form. "intl04" <kr005@hotmail.com> wrote in message news:414cb645.0402241213.70a52e0c@posting.google.com... > Is it possible to create a Word form as the data entry form for an >...

Web resources about - How to call a function located in a form module (form open in form view) from an Access Basic global module? - comp.databases.ms-access

Wave function - Wikipedia, the free encyclopedia
... (a ball attached to a spring ) in classical mechanics (A-B) and quantum mechanics (C-H). In quantum mechanics (C-H), the ball has a wave function ...

Eating chocolate 'improves brain function' - study
... news for those with a sweet tooth - a recent study has found that regular chocolate consumption is associated with better cognitive function. ...

Using Functions to Make Better Abstractions
... (code that is tightly coupled to its own implementation details). I was wrong. I was wrong because I had an incomplete understanding of functions. ...

Cisco launches new network functions virtualization infrastructure solution to help service providers ...
Al-Bawaba Cisco launches new network functions virtualization infrastructure solution to help service providers run network ... Al-Bawaba ...

Google Maps for iOS adds detour function, 3D touch support
Google has extended its pit-stop feature the ability to find places to stop off on journeys to iPhone and iPad users with the release of Google ...

LVMH's Hublot May Be Next Brand for Smart Functions, Biver Says
Hublot will probably be the next LVMH watch brand to add smart functions, following TAG Heuer’s footsteps in combining Swiss craftsmanship and ...

Yahoo Begins Grim Job of Closing Functions, Laying Off Staff
Yahoo Food is closing, and other digital magazines on tech, travel and beauty are also scheduled for closing or major cutbacks.

Engineers 3D Print Tissue That Mimics How The Human Liver Functions
Engineers say they have 3D printed life-like liver tissue that could be a new platform in the lab to test the efficacy of drugs saving pharmaceutical ...

A 3D Printed Jet Engine Appears to Function
... jet engine . You may remember seeing a 3D printed jet engine grace our front page back in October. That one was beautiful didn’t function . ...

Supreme Court Justices Can Still Function With Eight
... Domain, https://commons.wikimedia.org/w/index.php?curid=7990759] But as to whether the remaining Supreme Court justices will be able to function ...

Resources last updated: 3/21/2016 10:28:30 AM