Solved

a pop-up  form

Posted on 2014-11-17
6
143 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

911 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

20 Experts available now in Live!

Get 1:1 Help Now