Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-14-2019, 07:37 PM   #16
Zydeceltico
Newly Registered User
 
Join Date: Dec 2017
Location: Pittsburgh, PA
Posts: 236
Thanks: 141
Thanked 5 Times in 5 Posts
Zydeceltico is on a distinguished road
Re: Don't save form until record is saved on second form

Quote:
Originally Posted by theDBguy View Post
Hi. There you go, you may have answered the question of where to put the code. If you add a “cancel” button on your inspection forms, you can use its Click event to delete the parent record if there’s no related child records in the other tables.
Please accept my - current state. :-)

Any even remote idea what the code looks like on that cancel button to reach across to the originating form to delete the parent record?

I am soooo grateful that you are following this post with me, It's one of the "last big hurdles."

Zydeceltico is offline   Reply With Quote
Old 03-14-2019, 07:41 PM   #17
Zydeceltico
Newly Registered User
 
Join Date: Dec 2017
Location: Pittsburgh, PA
Posts: 236
Thanks: 141
Thanked 5 Times in 5 Posts
Zydeceltico is on a distinguished road
Re: Don't save form until record is saved on second form

Quote:
Originally Posted by Zydeceltico View Post
Please accept my - current state. :-)

Any even remote idea what the code looks like on that cancel button to reach across to the originating form to delete the parent record?

I am soooo grateful that you are following this post with me, It's one of the "last big hurdles."

Or more specifically - - How do I reference back from Form 2 to Form 1?
Zydeceltico is offline   Reply With Quote
Old 03-14-2019, 07:45 PM   #18
Zydeceltico
Newly Registered User
 
Join Date: Dec 2017
Location: Pittsburgh, PA
Posts: 236
Thanks: 141
Thanked 5 Times in 5 Posts
Zydeceltico is on a distinguished road
Re: Don't save form until record is saved on second form

Google tells me to look to look at Unmatched Query Wizard and convert to Delete query. I'll play with that for awhile.

Zydeceltico is offline   Reply With Quote
Old 03-14-2019, 08:06 PM   #19
theDBguy
I’m here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 1,126
Thanks: 11
Thanked 257 Times in 251 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Don't save form until record is saved on second form

Hi. You don't need to reach back to form 1 because you already passed the ID to form 2, you should be able to use the same information to delete the unwanted record.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
Zydeceltico (03-14-2019)
Old 03-15-2019, 03:43 AM   #20
MajP
Newly Registered User
 
Join Date: May 2018
Location: USA baby
Posts: 1,293
Thanks: 22
Thanked 376 Times in 359 Posts
MajP will become famous soon enough MajP will become famous soon enough
Re: Don't save form until record is saved on second form

The purpose of the code I posted is that you cannot do a simple unmatched query. You can have inspections in multiple tables. So the query checks if have any child inspection is in any table.

https://www.access-programmers.co.uk...32&postcount=9

If you do not have any inspection and return to the main form, you now can decide to delete the InspectionEvent. You can run the check at any time.

MajP is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable the form controls if the record's field Saved is true Derek Modules & VBA 2 07-25-2016 08:57 AM
Create a button in a form to add new record that will be saved in other table pauld118 Forms 8 06-28-2011 02:13 PM
New record saved with no record on child form jdcallejas General 1 02-27-2009 07:55 AM
Would like my save button to display Record has been saved hardhitter06 Modules & VBA 34 01-30-2009 09:08 AM
two subforms, that i only want visible after record on main form is saved... edzigns Modules & VBA 6 08-28-2002 01:03 PM




All times are GMT -8. The time now is 09:00 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World