Fetching data from uploaded MS Access file with Tkinter

Viewed 29

I'm having a hard time fetching my data from the uploaded MS Access file. I just want to select and upload .mdb file and then display the data inside the frame according to my query line.

This is my code and I got stuck.

import tkinter as tk
from tkinter import filedialog, Text
import os

root = tk.Tk()

def addFile():
    filename = filedialog.askopenfilename(initialdir="/", title="Select File", filetypes=(("Microsoft Access", "*.mdb *.accdb"), ("all files", "*.*")))

canvas = tk.Canvas(root, height=500, width=500, bg="#263d42")
canvas.pack()

openFile = tk.Button(root, text="Open File", padx=10, pady=5, fg="#263d42", bg="white", command= addFile)
openFile.pack()

frame = tk.Frame(root, bg="white")
frame.place(relwidth=0.8, relheight=0.8, relx=0.1, rely=0.1)

root.mainloop()
0 Answers
Related