kmxs's Profile
Reputation: 4
Apprentice
- Group:
- Contributors
- Active Posts:
- 34 (0.05 per day)
- Joined:
- 22-June 11
- Profile Views:
- 842
- Last Active:
Apr 12 2012 01:53 PM- Currently:
- Offline
Previous Fields
- Country:
- CA
- OS Preference:
- Windows
- Favorite Browser:
- FireFox
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 25
Posts I've Made
-
In Topic: Auto Email PDF Report - Access 2003
Posted 25 Jul 2011
I used Lebans for the convertor, you can google it and download it.
'DEVELOPED AND TESTED UNDER MICROSOFT ACCESS 97 through A2003
'
'Copyright: Stephen Lebans - Lebans Holdings 1999 Ltd.
'Distribution:
' Plain and simple you are free to use this source within your own
' applications. whether private or commercial, without cost or obligation, other that keeping
' the copyright notices intact. No public notice of copyright is required.
' You may not resell this source code by itself or as part of a collection.
' You may not post this code or any portion of this code in electronic format.
' The source may only be downloaded from:
' www.lebans.com
'
'Name: ConvertReportToPDF
'
'Version: 7.51
delete file function
Private Declare Function DeleteFile Lib "kernel32.dll" Alias _ "DeleteFileA" (ByVal lpFileName As String) As Long ' Declaration -
In Topic: Auto Email PDF Report - Access 2003
Posted 21 Jul 2011
pmiroslav, on 21 July 2011 - 05:43 AM, said:Hi,
I'm trying to use your code but something is missing.
In your Private Sub generatePDF you Call ConvertReportToPDF and DeleteFile but this is not present in your example.
Yeah I was just trying to answer the question I asked before I left the thread. When I head in to work today I can dig out those functions and paste them in here for you. -
In Topic: Issue with currentdb.execute
Posted 12 Jul 2011
Ok I figured it out. It was what I had thought and there were too many queries on the stack that had not completed. When the after update finishes it tries to run whatever I queried in the code and it's own command which somehow conflict. I would love to know more about this and how it's functioning more technically.
DoCmd.RunCommand acCmdRefresh
This DoCmd will save the current change from the bound field and then the code within it's event can run after without conflict.
Private Sub chkVisa_Click() DoCmd.RunCommand acCmdRefresh If chkVisa.Value = True Then CurrentDb.Execute ("UPDATE Orders SET Visa=Yes, InvoiceSent=Yes, PaidDate=#" & Format(Int(Now()), "mm/dd/yy") & "# WHERE OrderID=" & txtOrderID.Value & ";") Else CurrentDb.Execute ("UPDATE Orders SET Visa=No, InvoiceSent=No, PaidDate=Null WHERE OrderID=" & txtOrderID.Value & ";") End If Me.Refresh End Sub -
In Topic: Issue with currentdb.execute
Posted 12 Jul 2011
This works when I unbind the checkbox. So it has directly to do with the ordering of the stack. Basically when it's bound and checked, and I run a click event it sends 2 queries to the stack for the same table. I would like to know a way to force the click code to run the query, update, then close it's connection so when it finishes and the check updates its bound field there is no conflict.
This is the final code that worked, unfortunately I had to suppliment with an on current even that checks if the field in the DB is True/False to update the form. Seems much less efficient than it could be, would love any other suggestions to do this with a bound field.
Private Sub chkVisa_Click() If chkVisa.Value = True Then CurrentDb.Execute ("UPDATE Orders SET Visa=Yes, InvoiceSent=Yes, PaidDate=#" & Format(Int(Now()), "mm/dd/yy") & "# WHERE OrderID=" & txtOrderID.Value & ";") Else CurrentDb.Execute ("UPDATE Orders SET Visa=No, InvoiceSent=No, PaidDate=Null WHERE OrderID=" & txtOrderID.Value & ";") End If Me.Refresh End Sub
I'm gonna throw you a rep for suggesting the bound fields fix but asking for a DB that is obviously dealing with credit card and financial data is a little fishy when I am supplying the relevant code to my problem. -
In Topic: Issue with currentdb.execute
Posted 12 Jul 2011
immeraufdemhund, on 12 July 2011 - 10:33 AM, said:would you mind sending me the access file so I can take a gander at the problem and the steps it takes to replicate the problem?
Sorry that's not possible. It's my office DB and the data is quite sensitive. Do you think if I use dao recordsets and edit then close them it will help?
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Location:
- Kamloops
- Interests:
- Programming
- Years Programming:
- 1
- Programming Languages:
- VB.NET, VBA, PHP, C, (HTML, SQL)
Contact Information
- E-mail:
- Click here to e-mail me
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
kmxs has no profile comments yet. Why not say hello?