[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ACCESS 2010 Option box trigger new form

Posted on 2012-08-27
3
Medium Priority
?
413 Views
Last Modified: 2013-03-09
Hello, I have a question about ACCESS 2010 screen setup.

I have a form which has a option group [weight]. The group has three option button which will feed value 1, 2, 3, to this field [weight]. I want to be able to trigger a new screen [screen2] if option 2 is checked / clicked. What VB code should I write?

Will screen2 carry over the key identifier if both screens have pointed to the same table?

Thanks.
0
Comment
Question by:radiate
2 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 38339915
<<I want to be able to trigger a new screen [screen2] if option 2 is checked / clicked. What VB code should I write? >>

 At what point do you want to trigger this?  When the record is saved?  If so, then you would use the forms AfterUpdate Event to check the value of the control and open the new form.

 If after the control itself was changed, then you'd use the controls AfterUpdate event.

You'd do:

If Me.<optiongroupname> = 2 then
   DoCmd.OpenForm
End If

<<Will screen2 carry over the key identifier if both screens have pointed to the same table?>>

 No.  You will need to either:

1. Pass the key value in the openform command in the openarg argument.
2. Have the new form based on a query that looks to your current form and controls for a criteria value.
3. Use a system or global variable to pass the key value to the new form and do a lookup.

 #2 is the simplest, just base the new form on a query, which in one of the columns has:

=Forms![<myFirstFormName>]![<myControlNameOrFieldName>]

 and it will be filtered to that one single record.

Jim.
0
 
LVL 11

Expert Comment

by:sparab
ID: 38969000
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question