software:microsoft:access
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| software:microsoft:access [2015/05/05 16:49] – [SaveAsText() in Access to export all code] superwizard | software:microsoft:access [2021/10/11 00:32] (current) – [Can t find project or library] superwizard | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== PtrSafe Access adjustment for 64 bit ====== | ||
| + | |||
| + | 2020-02-26 | ||
| + | |||
| + | |||
| + | Compile error 64-bit | ||
| + | |||
| + | Change this | ||
| + | |||
| + | Private Declare Function OpenProcess Lib " | ||
| + | Private Declare Function GetExitCodeProcess Lib " | ||
| + | |||
| + | to this and it will compile on both 32-bit and 64-bit | ||
| + | |||
| + | < | ||
| + | #If Win64 Then | ||
| + | Private Declare PtrSafe Function OpenProcess Lib " | ||
| + | Private Declare PtrSafe Function GetExitCodeProcess Lib " | ||
| + | #Else | ||
| + | Private Declare Function OpenProcess Lib " | ||
| + | Private Declare Function GetExitCodeProcess Lib " | ||
| + | #End If | ||
| + | </ | ||
| + | From < | ||
| + | |||
| + | |||
| + | 2020-02-20 | ||
| + | |||
| + | Compile error | ||
| + | |||
| + | |||
| + | |||
| + | Private Declare Function WaitForSingleObject Lib " | ||
| + | hHandle As Long, ByVal dwMilliseconds As Long) As Long | ||
| + | | ||
| + | ====== Can t find project or library ====== | ||
| + | <WRAP center round box > | ||
| + | |||
| + | |||
| + | dtFMSProcessingDate = Date | ||
| + | | ||
| + | | ||
| + | MsgBox VBA.Date | ||
| + | |||
| + | From < | ||
| + | |||
| + | Also | ||
| + | |||
| + | 2021-10-09 | ||
| + | |||
| + | TRIM() not found? Compile error: Can't find project or library in Excel 2007 | ||
| + | |||
| + | From < | ||
| + | |||
| + | |||
| + | Answer: **On the VBA window go to Tools-> | ||
| + | |||
| + | ClosedXML - Create Excel files in .Net | ||
| + | • Proposed as answer byTim Johnson at AptosFriday, | ||
| + | • Unproposed as answer byTim Johnson at AptosFriday, | ||
| + | Thursday, January 20, 2011 4:54 AM | ||
| + | |||
| + | From < | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | | ||
| + | |||
| + | ====== How to display Access query results without having to create temporary query? ====== | ||
| + | |||
| + | |||
| + | From: http:// | ||
| + | |||
| + | < | ||
| + | Const cstrQueryName As String = " | ||
| + | Dim db As DAO.Database | ||
| + | Dim qdf As DAO.QueryDef | ||
| + | Dim sqlStr As String | ||
| + | |||
| + | ' | ||
| + | ' Apparently you have that piece worked out. I'll use a simple query ... | ||
| + | sqlStr = " | ||
| + | |||
| + | Set db = CurrentDb | ||
| + | If Not QueryExists(cstrQueryName) Then | ||
| + | Set qdf = db.CreateQueryDef(cstrQueryName) | ||
| + | Else | ||
| + | Set qdf = db.QueryDefs(cstrQueryName) | ||
| + | End If | ||
| + | qdf.sql = sqlStr | ||
| + | Set qdf = Nothing | ||
| + | Set db = Nothing | ||
| + | DoCmd.OpenQuery cstrQueryName | ||
| + | If you still want to later discard the saved query, do this ... | ||
| + | |||
| + | If QueryExists(cstrQueryName) Then | ||
| + | DoCmd.DeleteObject acQuery, cstrQueryName | ||
| + | End If | ||
| + | This is the helper function for the above code ... | ||
| + | |||
| + | Public Function QueryExists(ByVal pName As String) As Boolean | ||
| + | Dim db As DAO.Database | ||
| + | Dim qdf As DAO.QueryDef | ||
| + | Dim blnReturn As Boolean | ||
| + | Dim strMsg As String | ||
| + | |||
| + | On Error GoTo ErrorHandler | ||
| + | |||
| + | blnReturn = False ' make it explicit | ||
| + | Set db = CurrentDb | ||
| + | Set qdf = db.QueryDefs(pName) | ||
| + | blnReturn = True | ||
| + | |||
| + | ExitHere: | ||
| + | Set qdf = Nothing | ||
| + | Set db = Nothing | ||
| + | QueryExists = blnReturn | ||
| + | Exit Function | ||
| + | |||
| + | ErrorHandler: | ||
| + | Select Case Err.Number | ||
| + | Case 3265 ' Item not found in this collection. | ||
| + | Case Else | ||
| + | strMsg = "Error " & Err.Number & " (" & Err.Description _ | ||
| + | & ") in procedure QueryExists" | ||
| + | MsgBox strMsg | ||
| + | End Select | ||
| + | GoTo ExitHere | ||
| + | |||
| + | End Function | ||
| + | </ | ||
| + | |||
| + | |||
| ====== SaveAsText() in Access to export all code ====== | ====== SaveAsText() in Access to export all code ====== | ||
| Line 197: | Line 332: | ||
| From: http:// | From: http:// | ||
| - | | + | From: https:// |
| + | |||
| + | | ||
| + | | ||
| + | | ||
| | | ||
| Centerport | Centerport | ||
| - | | + | |
| + | |||
| + | I. Click on the Windows Start menu and select ' | ||
| + | II. In the Run command window enter: | ||
| + | | ||
| + | III. Select OK to execute the command | ||
| ====== Forms: Date Picker without ActiveX ====== | ====== Forms: Date Picker without ActiveX ====== | ||
software/microsoft/access.1430844581.txt.gz · Last modified: by superwizard
