Posts tagged msaccess
comment block in vba msaccess
Feb 8th
Enable the edit toolbar, hignlight lines to comment, and click the “comment block” icon on the edit toolbar (middle of toolbar). This will add the ‘ to whatever you highlight.
Check if table is exist vba
Feb 8th
Problem:
Check if table is exist
Solution:
Option Compare Database
Public Function TableExists(strTable As String) As Boolean
Dim strName As String
On Error Resume Next
‘If table exists already then strName will be > “”
strName = CurrentDb.TableDefs(strTable).name
TableExists = Not (strName = “”)
End Function
Shell and AppActivate command vba
Feb 8th
Problem:
You want to open the file using send key, and active it as a window
Solution:
‘Define the task ID
Dim dTaskID As Integer
‘Open the file with your application
dTaskID = Shell(“applicationYouWantToOpenWith.EXE path+nameofthefile”)
‘Make it active window
AppActivate (dTaskID)