Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mathmatic calculation in MS ACCESS??????? HELP!! 4

Status
Not open for further replies.

qb828

Programmer
Sep 27, 2000
98
US
Hi Guys!

I would like to find out if I can do the calculation with data sets from the Access database.

I have a client who does GIS image mapping stuffs and he usually enters the data into the excel sheet and do the calculation.

He wants to create a data entry forms in the accesss and store the data in the database but he needs to manipulate his data..
Can this be done??

Another reason using the access database is that his GIS application can directly manipulate from the access database.

Can you help me if this can be done or not???
Thank you so much .


QB
 
What type of manipulation or math are you talking about? Many forms of math are possible.

Jim DeGeorge [wavey]
 
Actually, most everyrthing available to Ms. Excel is readily available in Ms. Access. Just add a reference to the Excel Library and most functions are available. For Excel functions which use "ranges", you generally need to supply an array of data, but there are variations on the theme, and I haven't decoded some of them. There are also some functions which have hte same name in Ms. A. and Excel -but have different requirements or returns. These can become quite a headache, and I know no 'map' which identifies these.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Thanks Jim & Michael.

Jim,
The calculation will be some mathmatical algorithm which converts some numbers into the coordinates.
Say I have X, Y, Z, W columns. I will use X & Y records to get Y. I will use some equations to the Y and will get w.

HOW do I need to calculations in Access ??
I will appreciate anything you might know.
THnaks


Michael,
Thank you for the response.
Using the same above example, how do use those functions in the access??

Do you know where I can get some tutorial or documentation for how to use the functions???

Thanka you again for all of your help.

Q


QB
 
Can you give examples of specific calculations. From what you have posted so far, it is very possible, but can't give much more help without knowing what the calculations are specificallly.
 
Say something like this

(X+1)(X+2)Y*Y+X(X-1)(X-1)=Z
W=Z-2(Z*Z)-3.124

Say X, Y are given. I need to find Z & W and inset into the Z &W column of access database....HOW??


QB
 
OK,

In the data entry form, bind a textfield to Z.
display code of the form
create a function e.g.
Code:
Private Function CalcMe()
If Not Me.NewRecord Then
[Z]=([X]+1)*([X]+2)*[Y]*[Y]+[X]*([X]-1)*([X]-1)
[W]=[Z]-2*([Z]*[Z])-3.124
End If
And put this in your Current() event of the form and AfterUpdate() events of your x and y fields:
Code:
Call CalcMe

Hope this helps,
makeItSo

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
The Original Table

Code:
ValX	ValY	ValZ	ValW
1	2		
4.25	3.88		
8.22	3.15		0

The Query (SQL)
UPDATE tblWXYZ_Updated SET tblWXYZ_Updated.ValZ = ([ValX]+1)*([ValX ]+2)*[ValY]*[ValY]+([ValX]-1)*([ValX]-1), tblWXYZ_Updated.ValW = [ValZ]-1*([ValZ]*[ValZ])-3.124
WITH OWNERACCESS OPTION;

The Result
Code:
ValX	ValY	ValZ	        ValW
1	2	24	        -555.124
4.25	3.88	504.535	        -254054.2
8.22	3.15	987.1098	-973401.8

I would usually refer questions at this level to the ubiquitous {F1} (a.k.a. "Help") as it is really to trivial to actually consider 'professional'. You appear to be simply panicing and not using the resources commonly available. I can't even imagine being hired as a consulant on a spreadsheet application, much less having experience ONLY in that venue, so I assume that there are other factors at work which are not evident to me. Since it is obvious that you do not have any understanding of Ms. A. specifically or relational databases in general, I would suggest that you not expose yourself to the perils of attempting to learn these "on the customer's nickle". They will probably notice long before the project is complete and will not think highly of you. At the very least, you should let them know the situation and provide any service while you are 'on the learning curve' (or at least the first job) at a reduced rate. IF The customer agrees, RUN (do not walk?) to your local book store and get some reference text re Ms. A. and do a cram course to prepare for the ordeal.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Thank you so much MakeItSo.
That helps. I know now what I need to do.

Thanks MichaelRed.
I don't know if you are upset that My clients might be paying a lot of fee or that I might be making more money than you.

You are right. I am an entry-level trying, pretending-to-know-alot web programmer.
I won't deny that I don't know a lot of stuffs.
I myself know well that I don't think I have a programmer's mind set.
I know a little bit of everything. My job won't allow me to become an expert on one thing. I do everything.

Now that you and MakeItSo explained to me. I found it very easy to do calculation in MS. acces or VB. I am not a experienced VB or SQL programmer but I can manage what you have written here.

A lot of time I don't know how I have to solve problems.
That is why I use forums like this to get some help.

Talking about the reference books, You name it. I have them all. From all the scripting books, PHP, ASP, PERL, Javascript, C++, Java, JSP/Servlet,VB, VBC, Access, Oracle, MySQL, SQL server, Windows server 2000, Linux, Unix, XML, A++, AD, Exchange Server, Cisco TCP....etc.
I do use books when I don't know something.

Hopefully as I do more projects I hope to become an expert programmer.
Until then I do what I need to do.
Thank you so much help and comments/concerns. I didn't take it personally so you shouldn't too.

Thanks again and I appreciate your help.


QB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top