473,412 Members | 3,860 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,412 software developers and data experts.

Why code won't run in Field Event Properties?

112 100+
I have code for running an update query that updates a field in a table. I would like to have it run when I change or add information to a field in my main form. If I put the code into a button it works fine but when I put it into my event properties for that field it will not run? I have tried in on After Update and On Change (which I thing would be the place to put it) but nothing happens? Am I doing something wrong? Code is below.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SetWarnings False
  2.     DoCmd.OpenQuery ("qrySortOrder2")
  3.     DoCmd.SetWarnings True 
Mar 10 '11 #1
1 1279
Redbeard
112 100+
Sorry figured it out... have to add it to the Forms after update not the text box!
Mar 10 '11 #2

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

Similar topics

3
by: Lachlan Hunt | last post by:
Hi, I've been looking up lots of documentation and trying to work out a cross-platform method of capturing a keyboard event and working out which key was pressed. From what I can find, there...
1
by: Carl Taphouse | last post by:
I'm attempting to write some VBA code that dynamically adds a default event handler to all the events on a form (including control-related events). In VBA, how do I selectively identify which...
2
by: MLH | last post by:
I have a form based on a table. The table has a Yes/No field. Its an A97 table. The form has a button that updates the value in the control from No to Yes for the record currently being edited. ...
1
by: | last post by:
How can I add code to a specific event (EG. add code to GetFocus of a textbox or an activate of the form)? I can't seem to find those events and if I double click on a control (eg. button ) I can...
11
by: Sarah | last post by:
I have code that I want to run so that if the result is true, it changes the current button's ".DialogResult" property to "DialogResult.OK". Problem is, when I run this code on the ".Click" event...
2
by: Antuane | last post by:
if i create custom public properties, why won't they be displayed in the properties sheet (windows controls). I've added a few properties to my form (base form), & find that they don't appear in...
2
by: Greg Strong | last post by:
Hello All, Is it possible to change table field lookup properties in code? I've been able to change other field properties in code, however so far no luck with field lookup properties. What...
8
by: stevew | last post by:
I'm using SQL within Visual Basic in conjunction with Access databases. Say I am about to insert a record with a long string for a particlar field. It would be useful to prevent errors to first...
4
by: FullBandwidth | last post by:
I have been perusing various blogs and MSDN pages discussing the use of event properties and the EventHandlerList class. I don't believe there's anything special about the EventHandlerList class in...
2
by: puzzlecracker | last post by:
I have about 100 of this sort in my main clas, and I would like to put them into interface: in Main class: public event onFooHandler OnFoo { add { m_dispatcher.onFoo += value; } remove {...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.