Solved

Access a dataset on a form from a module

Posted on 2014-04-18
1
196 Views
Last Modified: 2014-04-18
I have a dataset on a form with some bound controls.
The transaction based update is quite complex and I would like do place it in a module to keep all of the code for the update function in the same place, and separate from the code on the form

In the form I have a dataset, and when ready to call the update from the form I can access the data in the table by doing something like:-

dim DRow as datarow = me.ds.tables("Potrn").rows(0)

Fine

Now in the module I have :-

dim DS as dataset = form1.ds

now the code:-
dim DRow as datarow = ds.tables("Potrn").rows(0)

returns an error - no data at row(0)

Even more perplexing if I say:-
Dim DRow As DataRow = form1.DS("Potrn").Rows(0)

whereas in the form:-
me.ds.tables("Potrn").rows(0)
works fine
0
Comment
Question by:grwallace
1 Comment
 

Accepted Solution

by:
grwallace earned 0 total points
Comment Utility
It works if use the dataset.copy() method on the calling form
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

18 Experts available now in Live!

Get 1:1 Help Now