Solved

How populate form field with an option for a popup form

Posted on 2012-12-27
4
340 Views
Last Modified: 2012-12-27
I have a form and the user can create a new record from the navigation bar at the bottom of the form.  There is no command button to add a new record.  When the user clicks the add record button (on the navigation bar at the bottom of the form) I want a form to popup that has three choices for the user to select from.  This form will have three option buttons... (M)anufacturing, (P)roposal, and (I)nstallation.  When the user has selected one of the three choices I need the first form to have a field populated with either a "M", "P", or "I" (from the form that popped up).  The name of the field on the first form is "txtDrawingType"   The name of the 1st form is "frmDrawings" and the name of the 2nd form is "frmTypeSelection".

There is a 2nd part to this question but since we are to ask only one question per topic, I will save it until this one has been resolved.

--Steve
0
Comment
Question by:SteveL13
  • 2
4 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 38724841
Is this an option group that you are working with?

If so, use the After Update event of the Option Group:

Select Case Me.fraYourOptionGroupName
        Case 1:
                 Forms!frmDrawings.txtDrawingType= "M"
        Case 2:
                 Forms!frmDrawings.txtDrawingType= "P"
        Case 3:
                 Forms!frmDrawings.txtDrawingType= "I"
End Select

Open in new window

0
 

Author Comment

by:SteveL13
ID: 38724870
Nice.  But how do I launch the 2nd form from the navigation bar on the bottom of the 1st form?
0
 

Author Comment

by:SteveL13
ID: 38724923
Actually, never mind.  I'm going to accept and go on to the 2nd question.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38724933
On the current event of the form:

Sub Form_Current()
    If me.NewRecord then
        DoCmd.OpenForm "frmYourSecondForm"
    End if
End sub


JeffCoachman
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now