Solved

a pop-up  form

Posted on 2014-11-17
6
151 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 36

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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

837 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