You can reference a function in, for instance, the Field cell of a query
like this:
Field --> MyColumn: GetMyConstant() * [fieldname]
~~~
How to Create a General Module
1. from the database window, click on the Module tab
2. click on the NEW command button
3. type (or paste) the code in
once the code is in the module sheet, do
Debug,Compile from the menu
if there are no syntax/reference errors, nothing will appear to happen
-- this is good
Warm Regards,
Crystal
*
(: have an awesome day

*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
Hawki_ice wrote:
> Gah thanks so mush, i knew it was simple just the stupid help dosent give me
> any of that information just "you can do it" but not HOW to actualy do it
>
> Thanks so much
>
> "Rick Brandt" wrote:
>
>> Hawki_ice wrote:
>>> Ok this is driving me nutz, all I am trying to do is create a
>>> Constant which i can easy change in access and be able to use it in
>>> Querys to calculate totals
>>>
>>> can someone plse tell me how to make a Constant for my database and
>>> the "expression" i use to look it up
>>>
>>> seeing as microsoft cant put this simple information anywhere in
>>> there help or website
>> To be used in a query you need a user defined function that returns the value fo
>> the constant...
>>
>> Public Const MyConstant = "SomeValue"
>>
>> Function GetMyConstant() As String
>> GetMyConstant = MyConstant
>> End Function
>>
>> --
>> Rick Brandt, Microsoft Access MVP
>> Email (as appropriate) to...
>> RBrandt at Hunter dot com
>>
>>
>>