update query (1 Viewer)

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
of course, )))))))))))))))))))) means a laugh
 
Local time
Today, 14:14
Joined
Mar 4, 2008
Messages
3,856
Cool. Hungarian prefixes refer to a method of naming your programming objects and variables using a given standard. Usually, a prefix at the beginning of a text box name will be "txt". A combo-box/drop down list will be "cbo", and so forth. Some people (like me) extend that to variable names in code to define scope. For instance p_strIn would mean a parameter passed in to the subroutine of type string.

HTH.

HTH.
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
let me make the question simpler


Code:
VDt = DLookup("sumofclaims", "cl_74mpi", "claimreceiveddate>=#" & V1b & "# and claimreceiveddate<#" & V1e & "#")
VDtSum = sum(VDt)


this doesn't work
the first line is fine
the second line doesn't work

how do i get the sum of VDT?
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
Cool. Hungarian prefixes refer to a method of naming your programming objects and variables using a given standard. Usually, a prefix at the beginning of a text box name will be "txt". A combo-box/drop down list will be "cbo", and so forth. Some people (like me) extend that to variable names in code to define scope. For instance p_strIn would mean a parameter passed in to the subroutine of type string.

HTH.

HTH.

first of all, i didn't mean to offend you with that comment
trust me, i realize noone owes me anything, i was just trying to be funny
i guess it didn't work)))))))))))))

now, i understood the txt part, but p_strin - not really, probably because i don't know what subroutine means


also, can you maybe answer my previous question about summing that up?

again, i only post here after i try everything i can think of, i don't want you, guys, to think that i run here everytime i need something and i'm too lazy to do some research
not my case
 

llkhoutx

Registered User.
Local time
Today, 14:14
Joined
Feb 26, 2001
Messages
4,018
Nag, nag, nag. Don't bite the hand that feeds you.

Ahhhhhhh upstairs! Steps, I presume. Daily exercise, except for running for the train and letting your mouth run you fingers.

To find the first value in a set (table or query), do a grouping query and specifying the "First" value for desired column(s).

"Concantenating" is the method of building a string, e.g. "A" & "B" = "AB"; "A=#" & B & "#" where B is a date (8/27/08) is A=#8/28/08#. See: http://en.wikipedia.org/wiki/Concatenation. You obviously didn't Google it.

PHP:
VDtSum = sum(VDt)
is meaningless. VDT is a result of a Dlookup, a (single) value, there's nothing to sum. Query the Dlookup table or query, summing the VDT column.

Take a look a DAO coding, it'll help solve you manipulation problems. O'Reilly's Access Database Design & Programming (3rd Edition) by Steven Roman, $5 used. It'll change your life. It's well worth the $35 retail price. Be sure to get the 3rd Edition, not a prior ed.

I think that a new thread is in order.
 
Local time
Today, 14:14
Joined
Mar 4, 2008
Messages
3,856
Ain't nothin' to it. Just saw two other posts where someone new was dissing the experienced person who was trying to help them. I guess you weren't doing that.

Are you sure "sum()" is what you want?

This thread seems to have morphed quite a bit from what it started out as. I opened the attached DB (from post 1) and can't see any relevance to the rest of the post.

So, I'll try to answer what I think the question is based on the information I have that I understand:
Code:
select name, sum(claims) from table1 group by name;
will give you the sum of all the claims from any given "name". Of course you can filter/sort it however you want.

Code:
select network, sum(claims) from table1 group by network;
will give you the sum of all the claims for any given network.

And, since you have no unique index on table 1:
Code:
select name,network, sum(claims) from table1 group by name, network;
will give you the sum of all claims for a name within a network.

Thing is, I'm new to this party and am not sure how you got to where you were when I butted in. If you need much more from me, I'll need a lot more detail as concise as you can get it (I'm having problems with my attention span).

Obviously, you can replace sum() with count() and get a different, yet still valid answer. Or you can use them both and get a very valid answer.
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
i'm not biting))))))))))))
i was joking!!!!!!!!!!

and how am i nagging?

anyway, thank you, i will definitely get this book.
i'm selftaught and i really need to read something, i just wasn't sure what.
so if you say that book is good, i will order it right now


now, as far as the sum, there's no way to do it in VB? i have to make a query?
 
Local time
Today, 14:14
Joined
Mar 4, 2008
Messages
3,856
Holy mackarel, you two are acting like an old married couple.

lala, yell if you need more help. llkhoutx, yell if you want to grab lunch some time.
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
George, no, i'm not dissing anyone
if you pull up all my posts, half of them are praises and thank yous to all the people here and how amazing this forum is and so on
and i mean it all, the people here are amazing, and there wasn't one time when i didn't get an answer


yes, this is a new problem, has nothing to do with the topic, sorry

i'm trying to automate some data manipulation that i have to do

i get data, and it has to be put in a specific format
if you want, i can post it here, the real tables and the real format it has to be in, maybe then i won't even need to explain anything, since your attention span doesn't like boring long posts)))))))))))))))
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
you guys know each other??????????
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
OK George

the CLALL table is what it has to look like

all the CL_ tables are what the data looks like when i get it

the form that first opens up and has the button UPDATE TABLES - has all the code behind it. i'm not done with it yet, i copied it from a similar program i made, so it't not fixed as far as the field names and stuff

but it will give you an idea of what it's doing


so i'm trying to make a program that will automatically take all the data, manipulate it and plug it in the correct fields

right now i need to get it to sum that variable


also, maybe you will have a better idea of how to do this whole thing?
thank you so much for taking the time out
 

Attachments

  • CLVBWeeklySample.zip
    99.9 KB · Views: 98
Local time
Today, 14:14
Joined
Mar 4, 2008
Messages
3,856
I gotta go somewhere and won't be able to get to this until later tonigh. And another poster wanted me to look at his/her stuff, too.

No, we don't know each other. I've watched his/her posts and have gained a respect for him/her. Just thought it would be friendly to grab lunch.
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
thank you!!
i will also keep trying
 
Local time
Today, 14:14
Joined
Mar 4, 2008
Messages
3,856
I'm about to leave but wanted to check something first. I've looked through your data pretty quickly.

Is there a reason unioning the tables (CL_*) together into one query and then using the cross tab wizard on that single union query didn't work? Like I said earlier, I'm getting to the game late and have the attention level of a kitten.
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
have the attention level of a kitten

that's so cute


Is there a reason unioning the tables (CL_*) together into one query and then using the cross tab wizard on that single union query didn't work
i'm not sure how
i mean i know what you're saying and how to do it, but i don't know how to connect them, they all have different number of records for each day, and some other differences
and i'm not sure what i will gain from it
 

lala

Registered User.
Local time
Today, 15:14
Joined
Mar 20, 2002
Messages
741
ok George, i'm leaving
will check for your reply tomorrow
and thank you very much

and thank you llkhoutx for all your help too
 

ajetrumpet

Banned
Local time
Today, 14:14
Joined
Jun 22, 2007
Messages
5,638
Lala,

Your baggage is becomming a bit heavy around here. :D Lots of posts...
 

Users who are viewing this thread

Top Bottom