Good post.
I just started doing this within the past 6 months or so - it is a very nice way to make managing lots of queries much easier to do.
I'd love to see your examples if you'd like to share.
If using SQL in VBA on a regular basis I'd highly recommend you use a string variable for your SQL statements.
Makes the code much easier to read
Dim strSQL as String
strSQL = "INSERT INTO tblStartTimeUpdate (OrdersItemsID, StartTime )SELECT RunningSumTotal.OrdersItemsID...
Most DoCmd functions in Access VBA are also available to be used in Access macros.
Take a look at the 2 screen shots below that show the SelectObject and PrintOut functions in a macro.
I hope this helps.
Sorry, but I'm still using Access 2003.
Can you post the code you use to print the report?
EDIT 1: VBA command to print a report is below
DoCmd.OpenReport "MyReport", acViewNormal
To control printer via code see answer from Andrew Fergus at link below...
I'm pretty sure the problem is Access related.
See edited post that shows a quote from Ken Snell.
He says the import function in Access tries to guess the correct data type (text or memo) based on the first few rows of data being imported.
So if the first row (for memo fields) has > 256...
Depending on the version of Excel there are limits to the number of characters a cell can display and contain.
What version are you using?
See link below for similar discussion
http://bytes.com/topic/access/answers/879281-255-character-limit
EDIT 1: Sorry if I misunderstood the problem. I...
Type both the path and filename you want to save in the textbox.
I was able to save to C:\test\GaryPanic.pdf by entering c:\test\GaryPanic
If I exclude the path (Drive:\Directory\) then it always saves the file name in the textbox to My Documents.
For a network drive I assume you can type...
Not sure about controlling programatically.
You could install/setup the printer drivers on your PC (development PC) like they would be on the end user's computer and then save the reports to use those printer drivers.
Otherwise I think you will need to modify the reports on the end user's PC...
When you save each report you will have the option to save the report to print on the default printer or to a specific printer (by choosing from the list of windows printer drivers installed on the PC).
Choosing a specific printer should solve the issue of Access showing users messages asking...
John I really appreciate your explanation - thanks.
I'd also like to learn more about Class modules and how & when to best use them.
Do you have any beginner/intermediate level examples that you could recommend (links) or share (MDB files)?
Welcome pdow - I hope you can find the answers you need here.
The majority of my use of Access at work is to analyze data and generate reports from our AS400 by using SQL pass through queries.
If you have any specific AS400/Access question, I will take a look to see if I can help.
i got this to work so you can pass the desired year into the function
Sub FilterTest()
Call ADO_ListBooksPublishedYear(2007)
End Sub
Public Function ADO_ListBooksPublishedYear(yearPublished As Integer)
On Error GoTo Err_ADO_ListBooksPublishedYear
Dim rst As ADODB.Recordset...