How to write a macro that opens up the single form data upon After

L

Lin

Hi,
How do I write a macro that opens up the single form data upon AfterUpdate?

For example:
My first entry field is called ID# on the form. So, supposedly I am entering
a new data entry, as soon as I entered the information for ID# (which is
AfterUpdate), I would like to open up the file that will having matching ID#.
So, how do I write a macro that will open up a form that already contains the
ID#? If it does not that ID# already in the database, then I don't want that
macro to run.

Please help, thank you very much in advance.
 
A

AccessVandal via AccessMonster.com

You can use the openargs to filter the record of that single form.

Me.openargs = me.YourControlName
Docmd.OpenForm “YourFormNameHereâ€,,,,,, me.openargs

It not worth the trouble to code in macro as you’ll still need to write your
code in the VBA editor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top