T.Symbol=qryExpPosUndHistory_on.symbol should tell it which one of the date to choose from.
I think I got it working, but I'm not exactly sure what I changed. I've been working on this thing all day.
THANK YOU FOR YOUR HELP!
I do appreciate the time and assistance.
Yes I realized the sub query was my problem.
The market price should be used from the max date which is < the current records date.
The red area SQL should start with SELECT TOP 1 MarketPrice...
Sorry, I'm an idiot, I forgot to include the "top" statement in the sql. My sql in the program has it, just not the post. Sorry, that must be why you did not see the connection. My fault.
I thought the problem was because of the Select TOP issue. But it was just a guess. Now I have no idea why my code won't work. Sorry, I usually simplify my problems on the board. it make things easier. But in this case it made things harder.
SELECT qryExpPosUndHistory_on.MarketValue AS Expr2, nz((SELECT Marketprice FROM qryExpPosUndHistory_on AS T WHERE T.Symbol=qryExpPosUndHistory_on.symbol and T.appdate<qryExpPosUndHistory_on.appdate ORDER BY appdate DESC;),0) AS Expr1
FROM qryExpPosUndHistory_on;
This is my actual SQL and when I...
I have this SQL statement....
SELECT TOP 5 table1.myvalue AS myvalue223
FROM table1
WHERE table1.appdate<#6/10/2004#
ORDER BY table1.appdate;
But is returns more then the top 5, if I remove the order by statement it works fine.
What am I doing wrong? Please HELP I'm really in a jam!
thank you!!!!
HEllo,
I have a non-binding form with a text box.
I put
=(SELECT sum([table1]![field1]) FROM table1;)
as my control source but all I get is "name?"
What's wrong and how can I get this to work?
When I use the
DoCmd.TransferSpreadsheet acExport, , "myquery", strpath, True, ""
The numbers get cutoff.
The table will show....
[Field1]
12.1299
12.1546
10.1558
but the exported file in .CSV format only exports...
12.12
12.15
10.15
What could cause such a weird thing and HOW can I fix it...
THANK YOU, SO MUCH, YOUR A GENIUS!!!!
I thought it was going to be really complicated, but no, you made it so easy, I never thought of using month() function.
AGAIN THANK YOU!
The challenge is this.
You have data in a table with two fields "appdate" and "text"
[appdate] [text]
1/1/2004 DTD
1/1/2004 MTD
1/30/2004 DTD
1/30/2004 MTD
1/31/2004 DTD
1/31/2004 MTD
2/5/2004 DTD
2/5/2004 MTD
2/29/2004 DTD
2/29/2004 MTD
The goal is to...
Thank you it's very informative. But is there a way to remove the apostrophe during export? or maybe run a command through VBA in access to remove all the apostrophes on the sheet? Thanks
extra info....
I think it might have something to do with the fact that the field has a lookup using a combo box list from another table. But when I view the values in the table they look fine.
THANKS
When I use the
DoCmd.TransferSpreadsheet acExport, , "myquery", strpath, True, ""
I get an extra apostrophe in front of some fields. I'm not sure why. The particular fields are text fields, does that matter? How can I get rid of the extra apostrophe?
I get...
'mystring
'mystring1...
I would not even use an email program. Instead use NET SEND. Just insert this code and your message will popup when ever you get a post.
I assume this is within a LAN.
Shell("net send yourcomputername place message here")
It's so much easier.
or
shell("net send ipaddress place message here")
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.