If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
functions in queries
I have created a function and am calling it from a query as an expression.
When I run the query all is fine but when I run the report that uses the query I am told that it can not find the macro PreadScreenTime([event_sysid]) which is the function that I am useing. Why is it looking for a macro when it is clearly a function that is being used? The report asks for the data of the function by the name of the field in the query. The field is labled as: PreAdScreen: PreAdScreenTime([event_sysid]). Thanks |
#2
|
|||
|
|||
functions in queries
Where is the function? It must be in a module (not a module associated with
a form, nor a class). As well, make sure it isn't declared as Private. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "bindurajeesh" wrote in message ... I have created a function and am calling it from a query as an expression. When I run the query all is fine but when I run the report that uses the query I am told that it can not find the macro PreadScreenTime([event_sysid]) which is the function that I am useing. Why is it looking for a macro when it is clearly a function that is being used? The report asks for the data of the function by the name of the field in the query. The field is labled as: PreAdScreen: PreAdScreenTime([event_sysid]). Thanks |
#3
|
|||
|
|||
functions in queries
The function is in a module with many other functions that are used by the
dbase. It is declared as Public. "Douglas J. Steele" wrote: Where is the function? It must be in a module (not a module associated with a form, nor a class). As well, make sure it isn't declared as Private. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "bindurajeesh" wrote in message ... I have created a function and am calling it from a query as an expression. When I run the query all is fine but when I run the report that uses the query I am told that it can not find the macro PreadScreenTime([event_sysid]) which is the function that I am useing. Why is it looking for a macro when it is clearly a function that is being used? The report asks for the data of the function by the name of the field in the query. The field is labled as: PreAdScreen: PreAdScreenTime([event_sysid]). Thanks |
#4
|
|||
|
|||
functions in queries
The only other things that occur to me is that you've mistyped the function
name, or else you somehow have a macro with the same name as the function. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "bindurajeesh" wrote in message news The function is in a module with many other functions that are used by the dbase. It is declared as Public. "Douglas J. Steele" wrote: Where is the function? It must be in a module (not a module associated with a form, nor a class). As well, make sure it isn't declared as Private. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "bindurajeesh" wrote in message ... I have created a function and am calling it from a query as an expression. When I run the query all is fine but when I run the report that uses the query I am told that it can not find the macro PreadScreenTime([event_sysid]) which is the function that I am useing. Why is it looking for a macro when it is clearly a function that is being used? The report asks for the data of the function by the name of the field in the query. The field is labled as: PreAdScreen: PreAdScreenTime([event_sysid]). Thanks |
#5
|
|||
|
|||
functions in queries
PreAdScreen: PreAdScreenTime([event_sysid]).
PreAdScreen: =PreAdScreenTime([event_sysid]). Note the unexpected requirement for an "=" sign embedded in the data source declaration. Access uses the "=" sign to indicate that a VBA function is called. (~: Grin for Douglas who missed that :~) (david) "bindurajeesh" wrote in message ... I have created a function and am calling it from a query as an expression. When I run the query all is fine but when I run the report that uses the query I am told that it can not find the macro PreadScreenTime([event_sysid]) which is the function that I am useing. Why is it looking for a macro when it is clearly a function that is being used? The report asks for the data of the function by the name of the field in the query. The field is labled as: PreAdScreen: PreAdScreenTime([event_sysid]). Thanks |
#6
|
|||
|
|||
functions in queries
Say what, David?
I assumed that PreAdScreen: PreAdScreenTime([event_sysid]) was typed into a cell on the field row of the graphical query builder. You certainly don't need to include an = sign there. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) david@epsomdotcomdotau wrote in message ... PreAdScreen: PreAdScreenTime([event_sysid]). PreAdScreen: =PreAdScreenTime([event_sysid]). Note the unexpected requirement for an "=" sign embedded in the data source declaration. Access uses the "=" sign to indicate that a VBA function is called. (~: Grin for Douglas who missed that :~) (david) "bindurajeesh" wrote in message ... I have created a function and am calling it from a query as an expression. When I run the query all is fine but when I run the report that uses the query I am told that it can not find the macro PreadScreenTime([event_sysid]) which is the function that I am useing. Why is it looking for a macro when it is clearly a function that is being used? The report asks for the data of the function by the name of the field in the query. The field is labled as: PreAdScreen: PreAdScreenTime([event_sysid]). Thanks |
#7
|
|||
|
|||
functions in queries
My frequent errors are a result of my light hearted
approach to the forums :~) My next suggestion is that he is using "Sorting and Breaking" on the calculated field. :~) (david) "Douglas J. Steele" wrote in message ... Say what, David? I assumed that PreAdScreen: PreAdScreenTime([event_sysid]) was typed into a cell on the field row of the graphical query builder. You certainly don't need to include an = sign there. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) david@epsomdotcomdotau wrote in message ... PreAdScreen: PreAdScreenTime([event_sysid]). PreAdScreen: =PreAdScreenTime([event_sysid]). Note the unexpected requirement for an "=" sign embedded in the data source declaration. Access uses the "=" sign to indicate that a VBA function is called. (~: Grin for Douglas who missed that :~) (david) "bindurajeesh" wrote in message ... I have created a function and am calling it from a query as an expression. When I run the query all is fine but when I run the report that uses the query I am told that it can not find the macro PreadScreenTime([event_sysid]) which is the function that I am useing. Why is it looking for a macro when it is clearly a function that is being used? The report asks for the data of the function by the name of the field in the query. The field is labled as: PreAdScreen: PreAdScreenTime([event_sysid]). Thanks |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using calculated fields in multiple queries | Linguist | Running & Setting Up Queries | 6 | May 27th, 2005 02:09 PM |
Access2K append queries fail under XP Pro | [email protected] | Running & Setting Up Queries | 1 | May 25th, 2005 08:46 PM |
multiple SQL queries | yoyoh2ogirl | Running & Setting Up Queries | 5 | August 10th, 2004 09:18 PM |
Adding colored font to queries | wbfuga | Running & Setting Up Queries | 2 | July 15th, 2004 02:33 AM |
Queries and User Defined Functions | Ben Hannon | Running & Setting Up Queries | 3 | June 11th, 2004 09:05 PM |