473,441 Members | 1,399 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

can't access fom1.vb data from another module

I have a data input form with a structure that gets loaded with the input
data. I have a module calc.vb with lots of calculations to do on the data in
the structure. But I can't access the strutcure's data from the calc module,
even though both are public. What other declarations can I do to make it
accessible?

--

Patrick Sullivan, AA-BA, BA-IT
Nov 23 '05 #1
4 1440
Patrick Sullivan wrote:
I have a data input form with a structure that gets loaded with the input
data. I have a module calc.vb with lots of calculations to do on the data in
the structure. But I can't access the strutcure's data from the calc module,
even though both are public. What other declarations can I do to make it
accessible?


It would help to see your code. how are you trying to access the data?
Does Calc.vb module get passed a reference to Form1? If you don't
pass a form1 object to the calc functions, how it is suppose to see the
variables?

Chris
Nov 23 '05 #2
Duh, that sounds like a good idea. I am a C programmer trying to do this, C
seems more straightforward to me. Thanks!

--

Patrick Sullivan, AA-BA, BA-IT

"Chris" <no@spam.com> wrote in message
news:eK**************@TK2MSFTNGP09.phx.gbl...
Patrick Sullivan wrote:
I have a data input form with a structure that gets loaded with the input data. I have a module calc.vb with lots of calculations to do on the data in the structure. But I can't access the strutcure's data from the calc module, even though both are public. What other declarations can I do to make it
accessible?


It would help to see your code. how are you trying to access the data?
Does Calc.vb module get passed a reference to Form1? If you don't
pass a form1 object to the calc functions, how it is suppose to see the
variables?

Chris

Nov 23 '05 #3
"Patrick Sullivan" <ps****@eatel.net> schrieb:
I have a data input form with a structure that gets loaded with the input
data. I have a module calc.vb with lots of calculations to do on the data
in
the structure. But I can't access the strutcure's data from the calc
module,
even though both are public. What other declarations can I do to make it
accessible?

If you are using VB 2005, you may want to use form default instances. You
can access a form's default instance using 'My.Forms.<form name>.<member
name>'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #4
I fixed it. Passed a referrence to the structure in the form class from the
sub procedure to the external function. Now I got other problems.

--

Patrick Sullivan, AA-BA, BA-IT

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:el**************@TK2MSFTNGP15.phx.gbl...
"Patrick Sullivan" <ps****@eatel.net> schrieb:
I have a data input form with a structure that gets loaded with the input
data. I have a module calc.vb with lots of calculations to do on the data in
the structure. But I can't access the strutcure's data from the calc
module,
even though both are public. What other declarations can I do to make it
accessible?

If you are using VB 2005, you may want to use form default instances. You
can access a form's default instance using 'My.Forms.<form name>.<member
name>'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: MHenry | last post by:
Hi, We were going merrily along for 6 years using this database to record all client checks that came into our office, including information about what the checks were for. Suddenly, network...
6
by: Noozer | last post by:
We've created a new database and need to import the data from our old database. Both are MS Access databases and each have multiple tables. The table structure of each table is completely different...
3
by: eddie wang | last post by:
Hello, I am trying to export all the data from one Access database to another Access database. I selected one of my five tables, then clicked "File"-->"Export". Because my table from database A...
1
by: Davids | last post by:
ok this is basic but it really puzzles me. I have an .aspx page and within it a user control (for example mycontrol.aspx and it's code file mycontrol.aspx.cs). In the code for my base page I...
7
by: Ronald S. Cook | last post by:
In my .aspx page, I am trying to read file that is on a different on the company network. When I map a drive to it and call from within my .aspx page, I get this error:
2
by: wiggy | last post by:
Hello! I am new to this site and very new to C programming. I am writing a basic GUI in Turbo C which I can do with relative ease. However, our teacher has given us a C file whichwhen run, can...
4
by: Redivivus | last post by:
Hi How can i access Sessionstate from another class? Lets say i have webservice where i define Session=1; In my webservice project i have a common class. How can i access Session from this...
6
by: Ulrich Dorda | last post by:
I've got a probably embarrassing trivial problem with namespaces, but couldn't solve it myself nor find an answer in the net. Hopefully one of you guys can help me. What I want to do: Use the...
0
by: Gabriel Genellina | last post by:
En Sat, 12 Jul 2008 16:15:36 -0300, Akathorn Greyhat <akathorn@gmail.com> escribi�: Welcome! You have to pass in the namespace of the desired module - instead of globals. I'd use an...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.