?
Solved

Access a dataset on a form from a module

Posted on 2014-04-18
1
Medium Priority
?
215 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
[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
1 Comment
 

Accepted Solution

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

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

649 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