473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB code has no effect

ddtpmyra
333 100+
Hi,

I just started using MS Access 2007 and Im working on simple code on load event of my form (below) but these code does not take effect at all. Please educate me if there's some setting I need to make first.

Private Sub Form_Load()
Me.TxtName.Visible = False
Me.txtPhone.Visible = False
Me.TextLast.Visible = False
Me.LblAreaCode.Visible = False
Me.LblLast.Visible = False
Me.LblName.Visible = False
End Sub
Jun 20 '08 #1
5 1792
Megalog
378 Expert 256MB
First place I would look is under the form's properties, specifically the Events.

In design view, right click the form and choose 'Properties', if the window isnt already open.

Go to the 'Event' tab, and be sure it says [Event Procedure] in the 'On Load' line.
If not, then select the drop-down arrow in that field, and choose it.

Save, and load the form.. should work fine!

If this isnt the case, then maybe you have an On_Current event that is changing the visible values of those form objects after it loads.
Jun 20 '08 #2
missinglinq
3,532 Expert 2GB
In version 2007, the first question that needs asking when code doesn’t execute, has the folder holding the database been declared a “trusted” location? If not:

To trust your folder, click:
* Office Button (top left)
* Access Options (bottom of dialog)
* Trust Center (left)
* Trust Center Settings (button)
* Trusted Locations (left)
* Add new location (button)

Welcome to Bytes!

Linq ;0)>
Jun 20 '08 #3
Megalog
378 Expert 256MB
In version 2007, the first question that needs asking when code doesn’t execute, has the folder holding the database been declared a “trusted” location? If not:

To trust your folder, click:
* Office Button (top left)
* Access Options (bottom of dialog)
* Trust Center (left)
* Trust Center Settings (button)
* Trusted Locations (left)
* Add new location (button)

Welcome to Bytes!

Linq ;0)>
Ooooh that's probably it.. I disabled that so long ago I forget it even exists ;)
Jun 20 '08 #4
ddtpmyra
333 100+
It Works!
Great! Thanks you so much!
Jun 20 '08 #5
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Jun 20 '08 #6

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

Similar topics

18
by: Adrian B. | last post by:
Does anyone know of a framework or library that will enable me to use publish/subscribe comms? I want to create a server (using Python) running on a Unix box that will accept client connections...
2
by: Martin Drautzburg | last post by:
In the wx demoy TreeCtrl.py I find the following code, that should have no effect but seems to be needed nevertheless. class TestTreeCtrlPanel(wx.Panel): def __init__(self, parent, log): , isz)...
3
by: fastwings | last post by:
mm the code //////makemenu.h//// class menu { public: int op; pmenu(int op,int sub = 0) { switch op {
3
by: Dalan | last post by:
Perhaps someone knows how to structure the correct VBA code to use for allowing or disallowing use of the bypass key, because the code that I used as suggested by MSAccess 97 has failed to work. A...
11
by: Peter Steele | last post by:
I have a Windows application written in C# that I want to return a non-zero exit code when it it run. The problem is that as a Windows application, there doesn't seem to be a way to control this....
6
by: James Allen Bressem | last post by:
I was searching through the MSDN documentation trying to figure out how to do drag n drop and I found a sample program. The sample program did all sorts of fancy junk like dynamically create it's...
24
by: Gaijinco | last post by:
I found one of that problems all of us have solve when they begin programming: given 3 numbers print the greater and the lesser one of the set. I was trying to remember the if-then-else...
9
by: scriptguru | last post by:
I've found some funny pieces of code in one project... I don't know: to laught or to cry =) function toHex(decimal) { switch(decimal) { case 10: return "A"; case 11: return "B"; case 12:
6
by: Alfonso2968 | last post by:
Hello, If someone can help plz. I have searched everything and all I can find is how to drag and drop within a form from panel to panel. What I need to do is Drag an image from the desktop...
7
by: nolo contendere | last post by:
the alert message appears before the Effect.SlideUp even begins. How can I ensure that the SlideUp completes before executing the next statement? I've tried setTimeout, and I can kind of get it to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.