473,804 Members | 2,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global Fields In Access

Hi all:

I develop in both FileMaker Pro and Access. FileMaker has a global
field type, whereby the value of the gfield is the same for all
records.

Is there an equivalent in MS Access (2002)?

I don't want to set a variable in VB, since the value of the global
will change and requires input from the user.

Thanks!
===
Nov 12 '05 #1
3 3237
You can place a Const statement in the declaration part of a standard module.
Examples:
Const conAge As Integer = 34
Const conWage As Currency = 35000

conAge and conWage can then be used anywhere in your application.

BTW, do you have a website?
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com
"amywolfie" <am*******@veri zon.net> wrote in message
news:33******** *************** ***@posting.goo gle.com...
Hi all:

I develop in both FileMaker Pro and Access. FileMaker has a global
field type, whereby the value of the gfield is the same for all
records.

Is there an equivalent in MS Access (2002)?

I don't want to set a variable in VB, since the value of the global
will change and requires input from the user.

Thanks!
===

Nov 12 '05 #2
On 12 Jan 2004 09:14:27 -0800, am*******@veriz on.net (amywolfie) wrote:
Hi all:

I develop in both FileMaker Pro and Access. FileMaker has a global
field type, whereby the value of the gfield is the same for all
records.

Is there an equivalent in MS Access (2002)?

I don't want to set a variable in VB, since the value of the global
will change and requires input from the user.

Thanks!
===


No. The way this requirement is usually handled in Access is to have a
separate table that is only allowed to contain one row, and put the fields in
there. For the forms that interact with this table, set Allow Additions and
Allow Deletions both to false.
Nov 12 '05 #3
am*******@veriz on.net (amywolfie) wrote in message news:<33******* *************** ****@posting.go ogle.com>...
Hi all:

I develop in both FileMaker Pro and Access. FileMaker has a global
field type, whereby the value of the gfield is the same for all
records.

Is there an equivalent in MS Access (2002)?

I don't want to set a variable in VB, since the value of the global
will change and requires input from the user.

Thanks!
===


If you need to keep the value of the what would be the global field in
Access, you would have to write the value to either a table or to a
custom field, which you could retrieve as needed. Probably easier to
use the method Steve suggested, though. One way to change the value
is to let the user enter it in a form, validate it, and then write it
to the table. If you're going to just use the global field like an
accumulator variable or a counter, as you would if you were doing
loops in FileMaker, then you could just declare a variable in your
subroutine in VB.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2204
by: Julian | last post by:
Hi I have code in my login.asp which sets the online field in user database to true or 1. I am trying to use the same code in global.asa to change back the online field to 0 but it doesn't work. The code is very simple and it should work, any idea why it doesn't? Sub Session_OnEnd If Session("User_ID")<>" " Then ' check if user has logged in before.
3
8120
by: Dalan | last post by:
I need some assistance or advise in composing code for a global function module or a related one for populating values in text boxes on reports and forms with a name, actually several different names. There are over 50 fields in the database requiring name updates and I need to do this several times. And I don't want to use a table/form to perform this task. Here is a bit more information. Yes, I have done the changing of the values in...
19
4175
by: laurenq uantrell | last post by:
I'm using Access 2K. I'm hoping someone can tell me which method performs faster- (currently I'm using a mix of both methods) a.) creating custom properties and then calling functions to set and retrieve the values... (ie: application.currentproject.properties(propName)) b.) creating global variables in the form of an array and using a function to populate and retrieve them.
25
5184
by: Sahil Malik [MVP] | last post by:
So here's a rather simple question. Say in an ASP.NET application, I wish to share common constants as static variables in global.asax (I know there's web.config bla bla .. but lets just say I wanna use global.asax) --- Would you declare your static var as --- public static int x ;
15
2474
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for objects that the app used to speed up some global level data access and functionality. I have recoded the class libraries in .net and would like to acomplish the same functionality in asp.net.
4
3565
by: RoadRunner | last post by:
Hi, I have a question. I am asked to produce a global search of a given corporate name, in more that one database. Each database has different table names and different field names in the tables. Does anyone know if this can be done? Thanks
5
6345
by: tech.rawsteak | last post by:
I have a function that retrieves a user's login name from their workstation and looks it up on an employee table to return their full name (ie: jsmith -John Smith). Their full name is then displayed on each form as a greeting, while their login name is used to record their activities, as well as compared to a list of positions that allows different users to access different functions on the database. I have noticed two things however: ...
5
1625
by: simon.robin.jackson | last post by:
This requires a table called tblReplace with two text fields, old and new. Code: On Error Resume Next Dim db As DAO.Database Dim td As DAO.TableDef Dim f As DAO.Field Set db = CurrentDb
1
890
by: Web Search Store | last post by:
Hello, Is there a place I can put a class of global variables and have them available in the page_load routine? Here is a class: Public Class globalvar Public ddd As String = "howdy"
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10599
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10346
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.