from tkinter import*
import tkinter
import sqlite3
import sys
conn = sqlite3.connect('REVISION CARD.db')
c=conn.cursor()

def load():
    root=Tk()
    root.title("REVION CARDS")
    root.geometry("700x400+100+100")
    w1=Label(root, text="Question")
    w1.pack()
    e=Entry(root,width=40)
    e.pack()
    w2=Label(root,text="Answer")
    w2.pack()
    e1=Entry(root,width=40)
    e1.pack()
    toolbar=Frame(root)
    navbar=Frame(root)
    N=Button(toolbar, text="next",width=9,command=getNext)
    N.pack(side=RIGHT, padx=200, pady=5)
    B=Button(toolbar, text="previous", width=9)
    B.pack(padx=100, pady=5)
    toolbar.pack(side=TOP, fill=X)
    count=IntVar()
    c.execute("SELECT * FROM topic")
    list1 = c.fetchall()
    buttons=[i for i in range(10)]
    for num in buttons:
        btn=tkinter.Button(navbar, text=num)#command=
        btn.pack(side=tkinter.TOP)
    navbar.pack(side=RIGHT, fill=X)
    global list1
    global e
    global e1
    global count

def getNext():
    try:
        e.delete(0, END)
        e1.delete(0, END)
        e.insert(0, list1[count.get()][1])
        e1.insert(0, list1[count.get()][2])
        count.set(count.get()+1)
    except IndexError:
        #root.destroy()
        e.insert(0, "NULL")
        e1.insert(0, "NULL")

#***************************************************** THE MENU ***************************************************
root =Tk()
root.title("REVION CARDS")
root.geometry("700x400+100+100")
w1=Label(root, text="REVISION CARDS",fg="red", font=("Comic Sans", 16))
w1.pack()

toolbar=Frame(root)

test_topic=Button(toolbar, text="Test on topic",font=("Comic Sans", 12),bg="red")
test_topic.pack(side=BOTTOM, padx=2,pady=30)

load=Button(toolbar, text="Load Revision Cards from a topic",font=("Comic Sans", 12),bg="green",command=load)
load.pack(side=BOTTOM, padx=2,pady=40)

create_new=Button(toolbar, text="Create New Revision Cards for a topic",font=("Comic Sans", 12),bg="orange")
create_new.pack(side=TOP, padx=2,pady=50)

toolbar.pack(side=TOP,fill=X)

You have two root=Tk() statements which Tkinter does not like. Also you don't have a mainloop(). And I have no idea what you want to do or why this program was posted here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.