Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Calling Public Function from another form

Posted on 2004-11-24
2
Medium Priority
?
152 Views
Last Modified: 2010-04-23
I have 2 forms. One being a Search form and the other being the Data form.

The Search form is loaded from the Data form where the user conducts their search.

My problem is that after the user finds the particular record they're after and pick it up from the list I need to call a Public function in the data form to load all the data into the data form.

How can I call this function in the data form from the search form?
0
Comment
Question by:PeterErhard
2 Comments
 
LVL 4

Accepted Solution

by:
srcalc earned 2000 total points
ID: 12671618
This code should do what you are looking for. I am assuming that for search form is named SearchForm and your data form is named DataForm.


---------SearchForm code

Public dataForm as DataForm

Private Function loadData()
      Return DataForm.getData()
End Function



---------DataForm code

Private Sub showSearchForm()
      Dim sForm as new SearchForm
      sForm.dataForm = me
      sForm.Show()
End Sub

Public Function getData()
      'Code to get data and return it
End Function
0
 

Author Comment

by:PeterErhard
ID: 12671682
Thanks - that did the trick.
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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

580 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