Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-02-2019, 10:21 AM   #1
Zydeceltico
Newly Registered User
 
Join Date: Dec 2017
Location: Pittsburgh, PA
Posts: 624
Thanks: 466
Thanked 7 Times in 7 Posts
Zydeceltico is on a distinguished road
auto open form when value chosen in cbo

Hi All -

I have a form where I record inspection data.

One of the bound controls is a combo box with several options in it. In most cases, the user would make a selection in the cbo and when the form is closed the chosen value will be stored in the underlying table.

There is one potential selection - that if chosen by the user - I would like for another form to immediately open - right then on AfterUpdate of the cbo - or when the cbo loses focus. The user would then fill out a couple of details to be stored in a different table, hit a Save button, and return the original form and complete the rest of the data input fields.

How can I tell the cbo that if the user chooses this specific option from your list of options then open the second form without closing the first form keeping the first form open so the user can return to it after filling out the second form?

Thanks,

Tim

Zydeceltico is offline   Reply With Quote
Old 12-02-2019, 10:26 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,486
Thanks: 58
Thanked 1,419 Times in 1,400 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: auto open form when value chosen in cbo

Hi Tim. You could try the AfterUpdate event of the Combobox. However, if the second form needs to refer to the same record from the previous form, as part of a referential integrity constraint, then you may have to save the main record first before opening the second form, which I am not sure how it would affect your current process.
__________________
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 online now   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
Zydeceltico (12-02-2019)
Old 12-02-2019, 10:53 AM   #3
Zydeceltico
Newly Registered User
 
Join Date: Dec 2017
Location: Pittsburgh, PA
Posts: 624
Thanks: 466
Thanked 7 Times in 7 Posts
Zydeceltico is on a distinguished road
Re: auto open form when value chosen in cbo

Quote:
Originally Posted by theDBguy View Post
Hi Tim. You could try the AfterUpdate event of the Combobox. However, if the second form needs to refer to the same record from the previous form, as part of a referential integrity constraint, then you may have to save the main record first before opening the second form, which I am not sure how it would affect your current process.
Hi DB - yeah - exactly.

I think i'm going to have to create a table called InspectionDetails to house data like this. Then - pass Inspection_ID (from the first form) to the second optional form via OpenArgs which would then associate an Inspection_ID number with an InspectionDetail_ID. Haven't worked it out yet but that's what I'm thnking I'll need to do.

Zydeceltico is offline   Reply With Quote
Old 12-02-2019, 10:58 AM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,486
Thanks: 58
Thanked 1,419 Times in 1,400 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: auto open form when value chosen in cbo

Quote:
Originally Posted by Zydeceltico View Post
Hi DB - yeah - exactly.

I think i'm going to have to create a table called InspectionDetails to house data like this. Then - pass Inspection_ID (from the first form) to the second optional form via OpenArgs which would then associate an Inspection_ID number with an InspectionDetail_ID. Haven't worked it out yet but that's what I'm thnking I'll need to do.
Give it a try and let us know if you get stuck. Good luck!
__________________
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 online now   Reply With Quote
Old 12-02-2019, 11:31 AM   #5
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,214
Thanks: 10
Thanked 226 Times in 214 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
Re: auto open form when value chosen in cbo

You might want to open form2 as modal to ensure that a) user cannot do anything but complete it and b) stop code from completing in the calling procedure until form2 is closed.

__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)

Last edited by Micron; 12-02-2019 at 11:32 AM. Reason: Clarification
Micron is online now   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
Open Form Print Preview with chosen sort Kronix Forms 1 02-05-2018 05:28 AM
auto pop up to form when you open access DARRENRRR Forms 10 01-09-2013 07:11 AM
Can you auto(Update) everything in the form when open? morfusaf Forms 1 05-10-2012 01:54 PM
Auto Load Form on Open Wilfy06 Forms 5 09-28-2011 04:46 AM
[SOLVED] Auto Open a Form at start up abc2002 Modules & VBA 3 07-01-2004 06:47 AM




All times are GMT -8. The time now is 05:33 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