Forum Discussion
Use Macro to switch Forms and Choose the Same Record
here is your demo. note that i remove Reference to one of your db and
commented out a function in your Error handler.
OK. Thanks for the suggestion(s). The initial one gave me an error on the error handler. The 2nd one worked, but I have never used VB.
I have tried to use a macro (button on the footer) to OpenForm and then either (a) GoToRecord or (b) FindRecord. Really, pretty simple stuff. But neither will point me to the record that I seek.
So, here is my try. A simple macro in sampleForm will open up FormOne on the desired record, and not filtered to ONLY that record.
Then, another macro [via button on FormOne header] that fails my mission because, while it will choose the correct record in FormTwo, it filters to ONLY that record. Although some users would want it that way [CICS, other older DBMS systems, etc].
Good grief - how did you attach the Zip file? I cannot do it here. Drag & drop says Zip is not supported, nor does my bar show any 'Attach file' option. So here is a Google Drive link for my version of this sample DBMS: https://drive.google.com/file/d/120c3UY9Ohfpzlyzd72M5Nfq-b6iad3jH/view?usp=sharing
- George_HepworthJan 06, 2022Silver ContributorI almost never use macros. They are too basic and simplistic. I am convinced VBA is the right tool for the job.
I'll look at your accdb later today, when I have a few minutes.