Solved

call sub in another loaded form

Posted on 2013-01-13
2
287 Views
Last Modified: 2013-01-23
I have a piece of code thx to an expert that checks if a form is loaded and then sets its slider control.

I have a sub called setfilter in the other loaded form (frmsmmtmaster). How do i get that sub to run?

If Me.BtnToggleSyncForms = True And CurrentProject.AllForms("FrmSMMTMaster").IsLoaded Then
 Forms!FrmSMMTMaster.Form.Controls.Item("ccslider").Value = Me.CCExportSlider.Value

End If
0
Comment
Question by:PeterBaileyUk
[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
2 Comments
 
LVL 29

Accepted Solution

by:
IrogSinta earned 500 total points
ID: 38773501
Make your procedure public instead of private.
Public Sub setfilter()

Then call it this way:
Call Forms.FrmSMMTMaster.setfilter
0
 

Author Closing Comment

by:PeterBaileyUk
ID: 38813293
apologies for delay I have been unwell.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

691 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