Solved

a pop-up  form

Posted on 2014-11-17
6
160 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Expert Comment

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

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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…

738 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