Solved

a pop-up  form

Posted on 2014-11-17
6
140 Views
Last Modified: 2014-11-26
See attached.

How do I write a VBA code that when I click the button : "קליטת נתונים מהמחוג"", the form number 2 will pop-up in the form number 1?
0
Comment
Question by:akinamon1
6 Comments
 
LVL 10

Expert Comment

by:Gozreh
ID: 40448345
Dont see any thing attached
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 40448379
Look at the arguments for the DoCmd.OpenForm method.  You will see them as you start typing.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40448438
"pop-up in the form number 1?"

Do you mean a popup, or are you looking for a subform that is hidden on (embedded in ) form one, that is hidden until the button is clicked?  If the latter, then you have to create a subform (name it "sub_form") control on the main form.  Leave the SourceObject blank, and set the visible property to No.

The, use the button click event to set the SourceObject and Visible Properties:

Private SUB yourButtonName_Click

    me.sub_form.SourceObject = "Form2Name"
    me.sub_form.Visible = true

End Sub

If the form and subform are supposed to be linked on a value then you will probably need to set the subforms LinkMasterFields and LinkChildFields properties as well
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40448449
form number 2 will pop-up in the form number 1?
You can't actually make a form "pop up" in another form, but you can make a form pop-up in the Access window. As Pat said, use the OpenForm method:

DoCmd.OpenForm acForm "YourFormName", acNormal, , , , acDialog

This would open a Dialog form (i.e. a Popup form that you must interact with). If you want a form to be a Popup form, you have to set those values in the Form Design view.

If you want to show one form in another, you'd use a Subform control. Add a Subform control to your form, and name it something like "sfMySubform". Then, use code like this to show a form named "Form2" in that control:

Me.sfMySubform.SourceObject = "Form2"
0
 

Author Comment

by:akinamon1
ID: 40449607
sorry i didn`t understand. for your assistance here is a print screen and i will describe what i need:
navigation screen.when i click on the button in the navigation screen (form) :"קליטה ממערכת מחוג", it will open in the same window a sub-form called "klita"
0
 
LVL 84
ID: 40449745
Those look like navigation buttons?

If so, then I'm not sure you have much control over the process. The Navigation Buttons basically open a form as defined in the "Navigation Target Name" in the NavigationSubform control associated with the Navigation Control.

That said - if you set the "Navigation Target Name" property to "klita", this should open that form in the Navigation Subform. You can access the setting by opening the Navigation form in Design view, and then click the Data tab in the Properties dialog.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

21 Experts available now in Live!

Get 1:1 Help Now