Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

In a vba module - call an event within a opened Access form

Posted on 2011-02-20
3
Medium Priority
?
596 Views
Last Modified: 2013-11-28
Per the following code and following URL:

http://www.tek-tips.com/viewthread.cfm?qid=1638344&page=1

I'm trying to add to my knowledge and attempt to call the event from another form called frmDash (WHICH DOES NOT HAVE A SUBFORM AT ALL).  Thus I have to adjust the syntax.

The event called txtColor_DblClick itself is also described below which is directly comes from frmDash itself.

How may I adjust the syntax on Dash4 to get this to work?
'modDash has...

Public Function Dash4()
On Error GoTo Err_This

  If IsOpen("frmDash") = False Then DoCmd.OpenForm "frmDash"
  
  Call Forms("frmDash").Controls("txtColor").Form.txtColor_DblClick
  'Call Change_Color_Dash
  'Call forms("form name").controls("subform control name").form.ProcedureName
  
Exit_This:
  Exit Function

Err_This:
  Call Error_Action(Err, Err.Description, "modRibbon @ Dash3", Erl())
  Resume Exit_This

End Function

'frmDash has...
Public Sub txtColor_DblClick(Cancel As Integer)
On Error GoTo Err_This
  Call Change_Color
Exit_This:
  Exit Sub
  
Err_This:
  Call LOG_ERROR(Err, Err.Description, "frmDash @ txtColor_DblClick", Erl())
  Resume Exit_This
End Sub

Open in new window

0
Comment
Question by:stephenlecomptejr
[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
3 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34939238
try

Form_frmDash.txtColor_DblClick
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 34939248
correction, you will need an argument

Form_frmDash.txtColor_DblClick(0)  

0
 
LVL 1

Author Closing Comment

by:stephenlecomptejr
ID: 34942216
Sincere thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

610 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