473,399 Members | 2,774 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,399 software developers and data experts.

Procedure Question

Since I don't know VBA very well, I have always used wizards and macros to create my databases.

I have created a button which opens a form to view a specific record. I created the button with a wizard, and in the button's OnClick property it reads
Expand|Select|Wrap|Line Numbers
  1. [Event Procedure]
obviously.

But, now I am creating a macro which needs to run the same event procedure and can't figure out how to reference it.

Can I do this without the use of VBA?

Please see Screen shot
Thank you.
Nov 30 '06 #1
3 1207
MMcCarthy
14,534 Expert Mod 8TB
Since I don't know VBA very well, I have always used wizards and macros to create my databases.

I have created a button which opens a form to view a specific record. I created the button with a wizard, and in the button's OnClick property it reads [code][Event Procedure][code] obviously.

But, now I am creating a macro which needs to run the same event procedure and can't figure out how to reference it.

Can I do this without the use of VBA?

Please see Screen shot
Thank you.
You can run code in a macro like a function. However, you can't get a macro to run an event procedure to the best of my knowledge (I haven't used macros in years). This is because event procedures are based on form events.

What are you using the macro for. Maybe we can suggest some vba code to replace it which could run the event.
Dec 1 '06 #2
I have a query which only shows transactions for the current week. If a change is made to a transaction, I need to go to through all of the transactions for the whole week, which shouldn't be more than 10 or so, and update each by running a macro because the result of one changed transaction will change the status of the other transactions in the query.

I was planning on (via macro) using GoToRecord, running the macro which opens the form filtered for that transaction record (which is the part I have a question about), running another macro which performs several very touchy calculations from bound and unbound fields on that form, then running the macro which updates some other fields and saves the records and closes the form, then repeating the macro again for the next record until all records have been updated.

Does that even make a little bit of sense?

Sorry to be confusing.
Dec 1 '06 #3
NeoPa
32,556 Expert Mod 16PB
It does make sense.
However, it sounds as if there may well be a better way of storing your information.
I can't be sure because I don't have all the details, but generally, when you need to update many records, based on the change of one piece of data then the data is not stored optimally.
Dec 1 '06 #4

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

Similar topics

5
by: Lauren Quantrell | last post by:
Just wondering if this is good form: Alter Procedure "mySPName" @UniqueID int AS set nocount on set xact_abort off DELETE FROM tblNameOne
1
by: Raquel | last post by:
Have a question on the Stored procedure method code generated by DB2 development center for Java stored procedures. Suppose I have a requirement to return the resultset consisting of FIRSTNME,...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: singlal | last post by:
Hi, my question was not getting any attention because it moved to 2nd page; so posting it again. Sorry for any inconvenience but I need to get it resolved fast. Need your help! ...
7
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason...
3
by: Joseph Lu | last post by:
Hi, all I have a stored procedure created in SQL Server like the following lines. // stored proceudre code starts here CREATE PROCEDURE sp_insertdata @strdata varchar(250) , @rsult BIT...
5
by: ric_deez | last post by:
Hi there, I would like to create a simple search form to allow users to search for a job number based on a number of parameters. I think I understand how to use parameteres associated with Stored...
4
by: Henrik Juul | last post by:
How do I call my Stored Procedure recursively: CREATE PROCEDURE dbo.GetParentIONode ( @IONodeID int, @FullNodeAddress char(100) OUTPUT ) AS BEGIN
5
by: william.david.anderson | last post by:
Hi there, I have a newbie question regarding stored procedures and locking. I'm trying to use a stored procedure to perform a 'select for update' and return a cursor. Below is a stripped down...
11
by: peter | last post by:
I am trying to get a SQL stored procedure to use user maintained MQT implicitly which raises questions on when they are used or not used. In theory you would expect the stored procedure to pick up...
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?
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.