Bingo!
I found out that it is something to do with the report! I copied all the fields into a continuous form named "excel" and added the following code to a button.... Please note this code comes after a very long filter sql statement that compiles all the users search selections into one...
Ok... Ive been reading all the other horror stories on this forum about trying to export a report directly to excel and how the formatting is totally stripped.
However a simple acformatxls is a 90% solution to what I am doing because it allows me to apply my search filters to the query as...
How are you applying changes to the recordsource? I was able to make your code work with my setup... but it is exporting the entire db not those I have narrowed it by my configurable sql filter.
I am currently using a sql that simply takes all my search items and compiles them into one string...
I have been having problems getting any sort of sql that isnt a straight forward lookup to work... what should I be putting in the rsA!.... I tried datemodified but it threw an error. I even tried adding "AS Future" then doing rsA!Future, but no joy.
any tips? Here is my code.
Dim db As...
Awesome! Thank you!
This was the code I used for a select then update sql and it works great.
Dim db As Database
Dim strSQL As String
Dim rsA As Recordset
Dim strShuffle
strShuffle = "SELECT CRBlog.CRBdate FROM CRBlog WHERE (([ID]=4));"
Set db = CurrentDb()
Set rsA =...
PHV
That does work... so thank you for helping me find an alternative... but I have yet to get a SELECT sql to work. There are other places I really need/would like to use them.
How do I pass a value from a select statement to a msgbox or text box using a string? Am I missing something...
I am relatively new to using SQL but I have gotten several insert and update queries working quite well. I cannot however seem to figure out how to use the SELECT SQL to get a value from a table.
Here is my code that is under the "Click" action of a button:
Dim db As DAO.Database
Dim strSQL...
sibaker
Ironically I have had the opposite problem. My users when they delete items send thier deleted files to the recycle bin. I have limited space on the server and this has created a linear increase in the amount of data stored on the server. For those of you who wonder how Im doing...
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.