Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-access > #11719
| From | Bruno Campanini <brunocam@libero.it> |
|---|---|
| Newsgroups | comp.databases.ms-access |
| Subject | Re: Access 2016 - How to use a Data Macro... |
| Date | 2016-03-29 01:51 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ndcg1i$nav$1@gioia.aioe.org> (permalink) |
| References | <nd7at2$te1$1@gioia.aioe.org> <3b583a06-996c-4ded-9473-e0a7324b0cf2@googlegroups.com> |
Patrick Finucane pretended : > On Saturday, March 26, 2016 at 8:52:59 PM UTC-4, Bruno Campanini wrote: >> ... to run a VBA Sub/Function. >> >> I was only able to have a data macro to send a mail. >> But I would activate VBA code from within a data macro, >> e.g. showing a message box after deleting a table record, >> and so on. >> >> I read some script in the Internet but I was unable >> to have they working. >> >> Bruno > > I read the following. It may help you. > You can do this, but it not recommend. Remember, table triggers and store > procedure code does run independent of VBA and in fact it runs even if you > don't have Access installed. > > However, assuming you going to be using Access to always edit the data (a > reasonable assumption), then you can in fact have the table macro call VBA > code. There are several ways of doing this, but the most common and useful is > to set SetLocalVar to a VBA function. This has the added bonus of being able > to pass some values to that function which in most cases is likely required. > > So, keep in mind you can call VBA code, but then you are adding creating a > dependence from your tables to VBA. > gears? > So just use SetLocalVar to some dummy var, and place the VBA function in the > expression. I read about this SetLocalVar system and also about the LookupRecord system, but no ones is working with me. Windows 10 Pro, Access 2016, 64bit Did you try with your gear??? Bruno
Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Access 2016 - How to use a Data Macro... Bruno Campanini <brunocam@libero.it> - 2016-03-27 01:52 +0100
Re: Access 2016 - How to use a Data Macro... Patrick Finucane <patrickfinucanetx@gmail.com> - 2016-03-28 06:40 -0700
Re: Access 2016 - How to use a Data Macro... Bruno Campanini <brunocam@libero.it> - 2016-03-29 01:51 +0200
Re: Access 2016 - How to use a Data Macro... Patrick Finucane <patrickfinucanetx@gmail.com> - 2016-03-29 06:52 -0700
csiph-web