473,597 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with On Load event for form in .accde file

patjones
931 Recognized Expert Contributor
Hi everyone:

I have a form in my database called "frmChecks" . In the properties for this form, I set On Load to [Event Procedure], which points to some code in VB that maximizes the form window and sets a background color gradient for the form.

Everything works fine when I open the database and start the form in .accdb mode. However, when I convert the database to .accde mode and open it, I get an error that says "The expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events. *The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]. *There may have been an error evaluating the function, event, or macro."

To see if it was any of my VB code inside the module that was causing this, I commented it all out just leaving a blank sub routine, and I still get this error. I also tried On Open and On Activate to no avail.

Any ideas? Thanks!
Aug 17 '07 #1
4 5350
JConsulting
603 Recognized Expert Contributor
Hi everyone:

I have a form in my database called "frmChecks" . In the properties for this form, I set On Load to [Event Procedure], which points to some code in VB that maximizes the form window and sets a background color gradient for the form.

Everything works fine when I open the database and start the form in .accdb mode. However, when I convert the database to .accde mode and open it, I get an error that says "The expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events. *The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]. *There may have been an error evaluating the function, event, or macro."

To see if it was any of my VB code inside the module that was causing this, I commented it all out just leaving a blank sub routine, and I still get this error. I also tried On Open and On Activate to no avail.

Any ideas? Thanks!

You cannot open an object for design at runtime with a compiled database.
Aug 18 '07 #2
patjones
931 Recognized Expert Contributor
You cannot open an object for design at runtime with a compiled database.
I'm not trying to open anything for design. I just want to run it...
Aug 18 '07 #3
JConsulting
603 Recognized Expert Contributor
I'm not trying to open anything for design. I just want to run it...
If you commented out all the code for that form, and it is still giving you an error...then chances are the error is coming from something else. Hard to say though.

You understood what I meant about design at runtime?

Some properties cannot be set once your application is compiled.

How are you opening the form?
Aug 18 '07 #4
patjones
931 Recognized Expert Contributor
If you commented out all the code for that form, and it is still giving you an error...then chances are the error is coming from something else. Hard to say though.

You understood what I meant about design at runtime?

Some properties cannot be set once your application is compiled.

How are you opening the form?
Well, I'm certain that it's none of the code in my VB module for loading the form. Can't be the problem if I commented it out right?

I guess I'm not clear about design at runtime. I mean, when I open the database up, the form is supposed to be there and ready for the user to do things with.

What I just realized though is that I did make a simple switchboard form for the database. Maybe I should have that form be what comes up upon opening the database, then let the user open the other form from there and see what happens...
Aug 19 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
1738
by: martin | last post by:
please help I have a table with member details and another one to many table used for payments. The problem is that the foreign key is not saved into the payment table causing the table to not relate. I have the relational tick on. If I have the payment form as a subform then it works. I need the payment form as a standalone form so I can control the visibility of it and then the foreign key does not save. The foreign key is a long...
6
6999
by: Robin Bonin | last post by:
In my user contol I am creating a set of dropdownlists. Each list is created based on input from the other lists. The problem I am having is setting the selected index on the lists. If someone changes box1, I want to set the selected index in box2 = 0. When I do this, I dont get an error, but when the page loads, it still has the selected value and not 0. It seems that it is getting the selected value from the viewstate
3
2570
by: Tim::.. | last post by:
Can someone please tell my why I get the following problem when I type the following piece of code! How do I get around this??? The idea is that when a user clicks a button on a form it causes a postback to occur which in turn triggers a sub in a user control... Error: Argument not specified for parameter e of Public Sub UploadDate(Sender As
4
1939
by: Antonio Carpentieri | last post by:
Hi all, in my previous post I've wrong typed some tems.. this is the corrected post. in a aspx page I have a repeater like this: <asp:repeater id=repeaterResults runat="server" OnItemCommand="RepeaterResult_Event"> <HeaderTemplate> <table width="515" border="0" cellpadding="3" cellspacing="0"> </HeaderTemplate> <FooterTemplate>
14
3257
by: Altman | last post by:
Ok I have a control that is inherited from another class. In the child I put msgbox(me.name) in the load event. What always pops up is the name of the parent class and not the name of the instance of the object. WHY? Also if I can figure this out I'm hoping that I can put this in the load event of the parent and still get it to work.
2
4542
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was set to...it is set to false. Can someone show me what I am doing wrong and tell me the correct way? Thank you. In the page load event, I am doing the following:
1
4101
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem: I dynamically add an htmlcheckbox to a webform in the pages render and set the checked value to true. When the page loads, if I remove the check from the checkbox and then submit it, in the submit event the checkbox' checked value is still...
1
3478
by: bigshotj | last post by:
Hey Guys, I have made a small application that has a main form and a sub form. The main form contains fields like Bill No., Name of Customer, Month. and The subform contains several fields like Sr. No., Date, Invoice No., etc. I have made this application for a friend of mine who owns a small Transport company. So I want to give him the application in .accde format. But then I converted it to .accde and two problems popped out. The...
4
5719
by: MrDeej | last post by:
Anybody now if i can do this programtically? My challenge is that i have a maybe 10 distributions a week with updates and changes which i now have found the accde format to be of good use. I also want to force our developers to change the title, write version history and so before we make the accde file and all that i can manage if we can get VBA to make the ACCDE file instead of pushing the button in Access
0
8379
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
8021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5421
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3876
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
3917
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2393
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
1
1492
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1226
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.