By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

Procedure Question

P: 58
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
Share this Question
Share on Google+
3 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
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

P: 58
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
Expert Mod 15k+
P: 31,660
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

Post your reply

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