Re: uer
From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 02/04/04
- Next message: Bent: "Re: queries relationship to form data? 2 Q's"
- Previous message: Steve Schapel: "Re: queries relationship to form data? 2 Q's"
- In reply to: DZ: "Re: uer"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: uer"
- Reply: anonymous_at_discussions.microsoft.com: "Re: uer"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 04 Feb 2004 23:46:08 +1300
DZ,
Aha! Makes sense now. However, you can't refer to the function by
referencing the form whose class module contains it. And as far as I
know, you can't define a public function in a form's module, I think you
will have to put it in a standard module. Whether the form is open is
not relevant.
-- Steve Schapel, Microsoft Access MVP DZ wrote: > Thanks for responding Steve. > > I'm sorry for not being clear enough. Let me try to > explain more clearly this time. > > I'm creating a query in design view. In one of the column > headings in design view of the Query, I want to use a > function to create a calculated field. > > So I type a name for the calculated field "NewFieldName", > followed by the function. For function argument, I insert > the field name, "Field1", so that the function will > process each record in the field named "Field1" > > I have used functions in queries before that were either > built-in functions or custom functions that were located > in a standard module with no problem. > > So, normally, I would type the following expression in a > column heading in the query (I'm using a built-in > function as an example) > > NewFieldName: UCase([Field1]) > > But I want to use my custom function and it is not located > in a standard module. It is located in the module of a > currently open form. The reason that the function is > located in the form is that I want to encapsulate all of > the functionally of this program inside one form. > > I need to know the syntax for referring to my function > that's located in a form. > > In a column in query design view, I typed the following > but it did not work. > > NewFieldName: Forms!FormName!FunctionName([Field1]) > and > NewFieldName: [Forms]![FormName]!FunctionName([Field1]) > > Thanks form any help > > DZ
- Next message: Bent: "Re: queries relationship to form data? 2 Q's"
- Previous message: Steve Schapel: "Re: queries relationship to form data? 2 Q's"
- In reply to: DZ: "Re: uer"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: uer"
- Reply: anonymous_at_discussions.microsoft.com: "Re: uer"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|