One macro causing another Macro to not finish

Montez659

Well-known Member
Joined
May 4, 2005
Messages
918
Good morning (afternoon, evening) all!

I will try to explain this best I can, and will try to get a snapshot of what I am talking about here in a few after I figure out how to do it.

I have two forms, one a "list" and the other a details. One is essentially in datasheet view and the other individual records. There is a formula in the list so that if a user clicks on the the word "Open" it will apply a filter to the "details" form so that record will show. Clicking on "open" triggers an On Click event. Halfway through the Macro running as the code is called to open the form, the Macro halts to trigger the On Load event of the "details" form. All works well like this even though as I step through the code it seems like the rest of the "On Click" code doesn't trigger.

When it ceases to work properly is if I try to apply a filter to not show Archived records in the On Load event of the details form. If I do the simple code of ApplyFilter, the only thing that happens when the user clicks on "Open" is that it goes to record 1 instead of the correct record.

I will post the code or screenshots of the code here in a few.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Yes, please post any available code or macro actions/conditions/arguments so we can see what is going on. Do so for all of the applicable events.
 
Upvote 0
Last edited:
Upvote 0
Hmmm, well, after all that it seems to be working now. I have a love/hate relationship with Access when that happens.

EDIT: I take that back, it is not working. I put the code for the filter in the wrong place.
 
Last edited:
Upvote 0
What's the purpose of the ****** event?

It seems like you want change what happens when the form opens?
 
Upvote 0
First off, I have to say that there is a lot to this I don't understand. This (I believe) came from a MS template that the company I work for converted to do what they wanted.

So, if you are talking about the three asteriks (***), then I assumed that was just referring to the same expression as above. However your post had six asteriks, and I wonder if you typed something that the board filtered out.
 
Upvote 0
The board filtered out o n l o a d for some reason.

I was just wondering what that macro/code was meant to do.

I think it has something to do with either opening a form to a specific record or for new data entry.

If that was the case I was going to suggest another way to do that, which would hopefully avoid the need to use the load event.

It would probably have needed code rather than a macro though - I'm so used to code that I forget macros even exist sometimes.:eek:
 
Upvote 0
I thought something got filtered! When I linked to my dropbox, I had On Load (though no spaces) as the name of my pic and it returned all asteriks!

Anyways, I believe what it is doing is that when someone clicks on the "Open" and triggers the On Click, it is filtering down to a single record (it actually shows 1 of 1 record in the navigation pane on the bottom). This never seemed very plausible to filter down to one record when you should just be able to go to that one record. But I digress.

If you have a better way, then by all means please share. I am a bit partial to VBA myself at times.

And what is it with me and problems with archiving stuff? :)
 
Upvote 0
Norie, what was your suggestion for this? It would be really nice to get rid of the Macro ****** event!
 
Upvote 0
Well, I'm not sure exactly what the macro was meant to do but think it had something to do with opening a form in more than one way.

If that is what it's doing/meant to do then that could be done in code.

Exactly how to do it would be hard to tell without more information, basically what you want the code/macro to do.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top