Linq is probably on the right trail. I've used Stephan's code several times and continue to forget the modMouseHook.
Here is where blRet is used straight from Stephan's code:
Private Sub Form_Load()
' Turn the MouseWheel Off
Dim blRet As Boolean
blRet = MouseWheelOFF
End Sub
Without much information to go on, try uninstalling and re-installing the default printer and make certain it is selected as default before attempting to open the db. Oddly this has been the fix for several somewhat similar problems with access db's here at work.
If you don't like the built in navigation tool with record indicator, you can make your own navigation buttons then put an unbound text box next to them using the following as the Control Source:
=IIf([CurrentRecord]>Count(*),"New Record",("Record " & [CurrentRecord] & " of " & Count(*)))...
or this...
Private Sub Command26_Click()
Dim strCriteria As String
strCriteria = "[mytable]![ID]=[Forms]![myform]![ID]"
DoCmd.OpenReport "myreport", acPreview, , strCriteria
DoCmd.PrintOut acPages, 1, 1, , 1
End Sub
I've not much time to explain but...
check out sendobject - here's a snippit of code from one onclick event I use to do what you are talking about.
DoCmd.SendObject acReport, stDocName, acFormatRTF, "recipient@emailaddress", , , stDocName & " " & stDate, "Here is your list for today.", False
I have used a date range input form for a couple years now with pre-set range buttons. I wish I could remember where I got the code so I could give proper credit.
'Year to date button
Private Sub cmdCalYearToDate_Click()
txtFrom = "1/1/" & DatePart("yyyy", DATE)
txtTo = DATE
End Sub...
I'm not shilling for this author but from what I've seen of his example here, I am impressed. Maybe it can show you how to do what you need done.
http://www.rogersaccesslibrary.com/download3.asp?SampleName=AuditTrail.mdb
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.