#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Public Const PLDir As String = "D:\New Folder" ' Hardcoded just for demo program
Public const PLFile As String="COVID-19.mdb"
Public Access As JackcessDatabase
Public ACTable As JackcessTable
Public ACIndex As JackcessIndex
End Sub
Public Sub Initialize
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
xui.MsgboxAsync("1 " & PLDir & "\" & PLFile & CRLF & File.Exists(PLDir,PLFile),"Test")
Wait for msgbox_result
Access.open(PLDir & "\" & PLFile)
xui.MsgboxAsync("2 DB " & PLFile & " opened","Test")
Wait for msgbox_result
ACTable.Initialize(Access.GetTable("Electoral_Roll"))
ACIndex.Initialize(ACTable.GetIndex("Android"))
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub Button1_Click
xui.MsgboxAsync("3 " & NumberFormat(ACTable.GetRowCount,1,0) & " Members","Test")
wait for msgbox_result
ExitApplication
End Sub