in Ms Access how to make button go to previous form

harithdeans

New member
Local time
Tomorrow, 05:49
Joined
Feb 22, 2024
Messages
1
so basically i have two form which is adminform and auditform, and both has the fundingform. so if i want to put button to previous form at fundingform, how? I try many of solution live VBA and MAKRO but it does't go well. pls help me😭😭😭😭😭😭😭😭😭😭😭😭
 
I would pass the name of the calling form in OpenArgs and use that to return. Since you didn't post any of your efforts, we can't help fix them. ;)
 
If fundingform is a subform on both adminform and auditform you can use it's Parent property to get which of those is it is currently showing on:,


Then use DoCmd.OpenForm to open the other:


If you get stuck, post the code you have tried and we will help more. I suggest using VBA and not a macro
 
If the funding form is a separate form pass the name of the calling form in openargs and in the funding form close event use docmd.openform to open the calling form
 
The basic rule is that Access won't tell you anything you didn't tell it first. Which means that you store the name of the "previous" form in the Form_Close event or Form_Unload event at the moment that you close the "previous" form and try to launch the other form. I.e. you have to TELL Access which form was "previous" because it doesn't normally "know" that you need that info.

OR... maybe you don't close the previous form at all. You launch the funding form, do your thing, and then exit from it. In which case the previous form is still there (but was in the background). When you click into that form that was in the background, it is still there and still open.

And one last bit of business... that was your first post. Welcome to the forum.
 
I do this all the time. Here is a sample.

 

Users who are viewing this thread

Back
Top Bottom