Expression Calling Public Function In Access 2007

Hello Everyone,
 I have a perfectly functioning db in 2000-02 and 03. On a calendar
form, that lives inside another form, I have all the day buttons OnClick
event tied to an expression that points to a public function in the
forms code container.

Looks like this =ClickMe(11).

Code Looks like this:

Public Sub ClickMe(ByVal iLabelNum As Integer)
 DoCmd.Hourglass True
 Me.Repaint
   Call SelectDay(("lbl" & CStr(iLabelNum)))
 DoCmd.Hourglass False
Exit Sub

In Access 2007 (either in 2002 or converted to 2007), I receive an
error: something about "The expression On Click you entered as the event
property setting produced the following error: The expression you
entered has a function name that (Program name) can't find."


Is this a bug or a "Feature" in Access 2007?


WBR
~Robert
0
RJGNOW
1/9/2008 3:31:47 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1168 Views

Similar Articles

[PageSpeed] 38

I can't figure out how that could have worked in previous versions of 
Access, since as far as I'm aware that syntax only works with functions, not 
subs. (The function does not have to return a value)

What's the code for SelectDay?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"RJGNOW" <info_@_InvalidDOT.com> wrote in message 
news:DN5hj.4933$xA6.3912@trndny09...
> Hello Everyone,
> I have a perfectly functioning db in 2000-02 and 03. On a calendar
> form, that lives inside another form, I have all the day buttons OnClick
> event tied to an expression that points to a public function in the
> forms code container.
>
> Looks like this =ClickMe(11).
>
> Code Looks like this:
>
> Public Sub ClickMe(ByVal iLabelNum As Integer)
> DoCmd.Hourglass True
> Me.Repaint
>   Call SelectDay(("lbl" & CStr(iLabelNum)))
> DoCmd.Hourglass False
> Exit Sub
>
> In Access 2007 (either in 2002 or converted to 2007), I receive an
> error: something about "The expression On Click you entered as the event
> property setting produced the following error: The expression you
> entered has a function name that (Program name) can't find."
>
>
> Is this a bug or a "Feature" in Access 2007?
>
>
> WBR
> ~Robert 


0
Douglas
1/9/2008 4:39:17 PM
Doug,
 Oh man you are sharp. I have been staring at this problem a little to
long today. I didn't even notice that is was a sub... Changed it to a
function, and now all is good.... :-)

I guess Access 2007 corrected the "Loop Hole" in prev. versions.


Thank You!

WBR
~Robert




Douglas J. Steele wrote:
> I can't figure out how that could have worked in previous versions of 
> Access, since as far as I'm aware that syntax only works with functions, not 
> subs. (The function does not have to return a value)
> 
> What's the code for SelectDay?
> 
0
RJGNOW
1/9/2008 5:29:11 PM
Reply:

Similar Artilces:

GetKeyBoardState Function
Greetings, I am working on a function to see if Ctrl + S is pressed. Useing the GetKeyboardState Function is it possible to retirve this information? Also What I have written crashes excel any ideas what i'm missing? Dim anArray Dim Result As Long On Error GoTo HandleError anArray = Array(VK_CONTROL, VK_S) Result = GetKeyboardState(anArray(0)) Chip Pearson has a page on this, but using GetKeyState API function: http://www.cpearson.com/excel/KeyTest.aspx Cheers, Dave "Jeff" wrote: > Greetings, > I am working on a function to ...

Multiple if functions #2
I really need to know how could i do or use if functions :confused: example i have gotten all my students avarage and i want to put comments lik if for example Average ranges from 95 - 100 comments should be Excellent Average ranges from 90 - 94 comments should be Very Good Average ranges from 85 - 90 comments should be Good Average ranges from 80 - 84 comments should be Passed Average ranges from 79 - below comments should be faile -- Message posted from http://www.ExcelForum.com Hi grazielle, One way to do this. Put a following table somewhere. In this example in area F1:G5 ...

Can't recover mail
Hi, I lost mails from Send Items folder and I wanted to recover them somehow. I found dbx files - size of Send Files is 125MB... I used DBXtract to recover mails, it cuounts for me more then 500 mails but it shows me jus few of them... How to fix that? Is dbx file corrupted??? How to recover all 125 MB of mails, not just fex??? I urgently need help - thx! "shtuks" <shtuks@gmail.com> wrote in message news:1158657915.880701.224310@i42g2000cwa.googlegroups.com... > Hi, > > I lost mails from Send Items folder and I wanted to recover them > somehow. > > ...

Using Identities in Outlook same as Outlook Express
I have always used OUtlook Express and am considering using Outlook because of the increased security and features. I have Outlook 2003. When using Outlook Express I had 3 different email accounts and could use each independently and switch from one to another by just changing identities. I tried to set up Outlook and I entered the various email accounts and it downloads emails from all 3 accounts to the same inbox. Is there a way in Outlook to setup separate email identities and keep my emails separate like I did in OE? Is it really advantageous to change to Outlook over OE? It ...

How can I create a template equivalent to the Avery CD label one in Publisher 2007?
Hi, In Publisher 2007 the Avery CV label template has a circle marked out that I cannot interact with in any way. What is that circle and how can I create my own for my own templates? Similarly the jewel case insert template has rectangles that I can't interact with. Thanks Jim Arrange, Layout Guides, Left & Right 1.938" Top and Bottom .688" Grid Guides, 2 rows, .375" spacing. Create two circles --- 4.625" Create two intercircles ---1.625" -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Y...

Outlook Express default problem
When I go to options under Outlook Express and make it the default mail handler, apply it and close it out I can go back to it and it has made itself not the default mail handler, why does it do this and how do I fix it? this is an outlook rather than outlook express newsgroup. "G.Werkema" <anonymous@discussions.microsoft.com> wrote in message news:03b901c3cf21$ef7309b0$a301280a@phx.gbl... > When I go to options under Outlook Express and make it > the default mail handler, apply it and close it out I can > go back to it and it has made itself not the default mail &...

Add Buy X Get Y Functionality to define which is x and y
If you use Buy X get Y for Z in RMS 2.0, you can not define which is x and which is y. All you can do is assign the discount to both items and the discount is taken on whichever item is entered last. So, if you want to set up where a customer buys a $20 T-Shirt then they get a pair of $2 socks for free; if the cashier rings up the shirt first, then the socks, it works perfectly. However, if the cashier rings up the $2 socks first then they get the $20 T-Shirt for free! There needs to be a way to define that X is the T-Shirt and Y is the Socks. ---------------- This post is a sugge...

Speed up Login to Outlook Web Access
I'm Working with Exchange 5.5 SP4 on Windows 2000 SP3 the OWA is also on equal OS. The login is taken more the 6 Minute could I do something to improve it? Best regards, "news.microsoft.com" <tals@teleknowledge.com> wrote: >I'm Working with Exchange 5.5 SP4 on Windows 2000 SP3 the OWA is also on >equal OS. >The login is taken more the 6 Minute could I do something to improve it? > >Best regards, > Would need to know a little more about the specs of the OWA box, the network topology, what else resides on the owa and exchange servers etc. Mark Arn...

Making adjustments to Calendar in MOS 2007
I need to wrap text, reduce the size when printed in calendar HELP!!! "SuperReceptionist" <SuperReceptionist@discussions.microsoft.com> wrote in message news:A96A6288-2558-4E33-85A4-186A7B6224D4@microsoft.com... >I need to wrap text, reduce the size when printed in calendar HELP!!! Printing tools can be found here: http://www.slipstick.com/addins/calendar_print.asp. The Calendar Printing Assistant (a link to which is on the page I've cited) is a good place to start. -- Brian Tillman [MVP-Outlook] ...

Office 2004 and disk access
In order to evaluate Office 2004 for my lab, I installed it on a spare = partition=20 on an external hard drive. Now I can't unmount that partition under any=20 circumstances (that I've discovered). I'm running OS 10.3.4 on a G3 = iMacDV.=20 When I quite Word and then try to unmount the partition it resides on, I = get=20 a message that files on the drive are in use and I should quit = applications. I=20 get the same message if I quit *all* applications, including force = quitting=20 and relaunching the Finder. I've checked with Activity Monitor and ended = any process with Mi...

Mail queued on Front end server for Public Folder on Back End Server
I created a public folder on my back end exchange server and mail enabled it. Internal email from the global address list reaches the folder, however external email smtp does not. The external mail queues on the Front end Server with a retry status. Any idea why this would be happening? <anonymous@discussions.microsoft.com> wrote in news:1231e01c3f62c $1dd29600$a001280a@phx.gbl: > I created a public folder on my back end exchange server > and mail enabled it. Internal email from the global > address list reaches the folder, however external email > smtp does not....

Access Reports 06-20-07
Have a small employee database. Want to print ID cards for new hires. report works fine for the whole file, but for one-at-a-time, it seems that the report doesn't respect to filter - It wants to print all records instead of the filtered table. Appreciate any help. gg "gg" <greg.games@pacbell.net> wrote in message news:trgei.2503$vi5.1141@newssvr17.news.prodigy.net... > Have a small employee database. Want to print ID cards for new hires. > report works fine for the whole file, but for one-at-a-time, it seems that > the report doesn't respect to f...

How do I hide gaps in an Excel 2007 chart?
I have a bar chart that is showing gaps and i don't want them. The select data > hidden and empty cell button does not give an option to hide gaps. I think by default they are hidden but if you even click on this to see what it does the gaps are shown and no way to turn off. Hi, If you hide the actual rows then with the Plot visible cells only setting on the gaps will be removed. In xl2007 the setting is on the Select Data dialog, Hidden/empty cells button. Cheers Andy Waynesch wrote: > I have a bar chart that is showing gaps and i don't want them. The s...

Trouble with Multi-Threading (VC++ opening Access DataBase)
Hi all, I have an application which I did not write, but I want to improve it's performance (Obviously I do have the code). First of all I am not a database expert so my terms may not be exact, I appologize :-)) The application starts by reading a lot of data from the database tree via ODBC (MFC + VC++ 6.0). This process takes a few minuets, and I have more than one CPU, so obviously I was thinking of multi-threading. The point is that once I Multi-threaded the code, the program stuck during startup. Looking with a debugger, I saw that all threads are hanging while reading the DataBase....

2003 vs 2007 Chart problem
When using Excel 2003 I asked this question: "I have a sheet with 2 charts which get their data from some calculated cells that I'd really like to hide, but when I hide them, the chart dissappears. Even making the columns 0 width does this" ....and this was the answer that worked for me: "You need to change the properties of the chart object. Hold the SHIFT key whilst selecting the chart. This should give you a set of white square handles. Press <CTRL+1> to bring up the format dialog. On the Properties dialog select the option Do not move & size with cells. Now ...

Add-in function has #NAME error
I am using Excel 2000 and after I loaded my first custom-written addin, the addin function is apparently not recognized because when I put the function into a cell I get a #NAME error. The function name appears in the function drop-down list (I think this is called the Name Box) under "user defined" as you would expect. And I can pick it from there to put it into a cell. This eliminates any typo problem, but as I said I still get a #NAME error. In summary, I can pick the addin function from the Name Box and yet I get the #NAME error. I think "#NAME" means the item i...

Personal.xlsb does not load automatically when I start Excel 2007
Although my personal macro workbook (Personal.xlsb) is saved to my XLStart folder (In Microsoft Windows XP, this workbook is saved in the C:\Documents and Settings\user name\Application Data\Microsoft\Excel\XLStart folder). The personal macro workbook does not open automatically when I start Excel 2007. I get the following message when I try and record a macro using the macro recorder "Personal Macro Workbook in the startup folder must stay open for recording". Any suggestions how I can resolve this? Kind Regards, James, Try moving the file out of that folder, then start...

Permissions inside public folder
I have recently started administering a windows 2003 SBS network. Inside the public folders of the exchange portion, they have created some contacts and other items. I have three users that are marked as owners to these folders they created inside the public folders. Apparently these were created under exchange 5.5 and then migrated into their current setup (I didn't perform this as i recently started working for them). One user can perform everything just fine. The other two users, when opening a contact that was migrated in from exchange 5.5, get a permission error when tryin...

Access 2000 collaboration via email controls
I am wondering if Access has a similar ability to MS Project: Whereby tasks(Project) or rows(Access) can be e-mailed from within Access, the recipient can update fields from their in-box(no need for a copy of Acess here,) return the email, and have the database automatically updated upon opening the note. Is the abilty built-in, or must it be coded? Regards, Barry I have never heard of such an ability. So you would have to code something. -- Joe Fallon Access MVP "Barry" <handy_guy00@hotmail.com> wrote in message news:c3cb54cd.0401151639.41f45644@posting.google.com... &g...

Are macro sheets and macro functions no longer available?
At one time I used Excel for some rather fancy programming. In those days I was getting reasonably skilled at using macros. This included the possibility of defining a function on a macro sheet that had an argument and returned a result. As far as I can tell, that ability is no longer present. I realize that Visual Basic is now used for macros. I do not have experience with that. I do not know if it worth investing the time to become proficient at it. I have so little use for that that I have virtually forgotten all my regular BASIC. Bill -- As the years go by, dying just before hav...

Able to DeleteDosDevice for a drive letter but can't flush FS cache without reead access on device.
Hello, Is there anyway to dismount (flush any information about) a drive letter when you don't have read or write access to the volume directly. Background: I was able to setup the device and assign a drive to it so only the limited user could access it via the drive letter. That worked great and no security issues with other users accessing/reading the raw device while data was available. However, dismounting is a problem. I can't use the LOCK/DISMOUNT FSCTL on the volume when opened with "0" permissions (I have to have GENERIC_READ which fails unless I ...

Writing an activex control to proxy calls to an unregistered activex control
Hi all, One of my clients needs to support using two versions of an activex control within Internet Explorer. However, both versions of the control register to the same CLSID meaning that it is not possible to run both concurrently without some intervention. One idea that I had was to create a new activex control under a different CLSID (and associate that CLSID with a different mimetype) so that requests to the new mimetype will be sent to the new activex control, which will in-turn proxy those requests to the unregistered version of the activex control. Has anyone had experience doing any...

Read only access within a department
Hello, With the default settings in Project Server 2007, the Project Managers group has read/write access only to their own projects. How to give them Read only access to the projects belonging to other PMs, but only within a specific department (their department) in the organization? Thanks for your help Create a departmental structure in the RBS, then assign the PMs under the department heading. Configure the My Organization category to allow PMs to see projects owned by folks at the same level of RBS, and that should work - probably with some tinkering to get it exa...

Public folder Problem #13
We have just migrated from Exchange 2000 to Exchange 2003 in a F/B end environment. We still have one Exchange 2000 server as a backend as well as Exchange 2003. All public folders have been moved to the new 2003 exchange server. The problem I am finding now. If I create a mail enabled security group add a user to that groups and then add the group to a public folder and set the correct permissions the user cannot see the folder, but if I take the user out of the group and then add the user to the folder set permissions the user can see the folder. I would like to use groups to all publi...

Missing public data store
I've recently taken over the sys admin duties for a customer site. After looking through the event logs I discovered that the Exchange 2003 public data store would not mount because the store itself was missing. When I looked at the backups I found that inadequate backup processes were in place and there was no backup for me to use. I fixed the backup problem. Now, I've googled time after time looking for a way to regenerate the public folder without success. Does anyone have a pointer to a process for regenerating the missing public store and all it's system folders? Th...