How to Create Flash Cards with Microsoft Access

by Ragtimelil

I needed a set of flash cards that I could use to study Welsh. I wanted to enter my own vocabulary so I built it in MS Access. Here's how I did it.

I’m studying Welsh and have found a great source for free online audio lessons. I downloaded them into my MP3 player and mumble along when I take the dogs for their walks. The instructor insists that students don’t write anything down, but I can’t always understand the word unless I see it at least once. Besides, I doubt that I will be speaking Welsh much. I am more likely to read or write it.
I found some flash cards online for Welsh, but they use different vocabulary than the audio lessons I was listening to. I decided that I needed to create my own flash cards and to do that, I would use my MS Access 2002.

I’ll try to be as basic as I can with this little program but I’m assuming that the reader has used Access before and can do basic tasks like creating tables, forms, queries and adding buttons. If you need help, just send me a message and I'll create a tutorial for beginners.

Create a Table

When you first open Access, you will want to create a new project. Select Blank Database on the right. You will then have to give it a name and save it. Next the dialog box will pop up so that you can create a table. I use the Design View for this.

Don't forget to save as you go along.

table

 

The field names are the names of the headings for your table. I named the first one “word.” Not terribly descriptive, but once you name it you don’t want to try to change it. I should have used “Welsh word” or something like that, but I know what it means so we’ll move on. I also made this indexed with no duplicates down in the lower section. That way, I don’t have to search and see if I already entered the Welsh word in the database. The program won’t allow me to duplicate words. This is the only field (other than auto number, but you won’t enter anything into that) that doesn’t allow duplicates.

Next I put in “part of speech,” “pronounce” (a phonetic prompt to help me remember how the word is pronounced) and “meaning” which is the English translation. I added the ID with the autonumber function so that I could tell at a glance how many entries I have in the table. The “complete” field is set to “yes” or “no.” I will link that to a check box so that I can hide words that I already know. I will explain that further along.

 

table

The Vocabulary Form

Before I made my flash cards, I wanted an easy way to enter my vocabulary. I created a form for this by going back to the main menu of my database and selecting Create Form Wizard.I gave it a name of "frmVocab" and I linked it to the table I just created. Then I selected all the items offered.

I added a couple of buttons to make navigation easier. They are the built in buttons that you can create with the button wizard by just clicking the button tool and drawing the button where you want it.

I arranged my text boxes and put in a background color and it's done. Now all my new words will be added to the table.

Design View

form in Access

Flash Cards Form

Welsh to English

Now the fun begins. I created a form that was for my Welsh to English flash cards. I wanted the translation to be hidden until I clicked a button to make it visible so first I had to make the text box called "meaining" invisible. (Yes, I did misspell it but I don't want to try to change it now because I'd have to fix all the links to it and that would be not only time-consuming but I might miss some and mess up the program.)

code icon

To make it hidden, I selected the text box and then clicked on the funny square icon in the menu bar.

 

visual basicThat will open the Visual Basic program. I want the text box to be invisible when the form opens so I select "form" and "open" in the drop down boxes at the top. I will see these words at the top above the line.


Private Sub Form_Open(Cancel As Integer)

End Sub

Now I just need to insert the code Me.meaining.Visible = False    so that it reads...

 

Private Sub Form_Open(Cancel As Integer)
Me.meaining.Visible = False
End Sub

 

Now my text box with the English translation won't be visible. But I need a way to turn it back on. To do that, I'll create a button. I put "result" on the button for a label, but I named it "check" just to make it easier for me to remember. Again I selected the button and clicked on the code icon to put in the code to tell it what to do. I just closed the wizard when it popped up since there is no built in command for this. Now I want the text box to be visible when I click the button. The drop down boxes at the top should be set to "check" and "click". The code will be

Private Sub check_Click()
Me.meaining.Visible = True
End Sub

 

Now a click on the button and my translation appears.

Flash Cards

Flash Card
Flash Card
answer
answer

Answer Box

In the center I also added an unbound text box, meaning it isn't connected to anything on the table. I just put it there to type in my answers to check against the translation when it pops up. I don't always use it. Sometimes I just say the answer, but if I do use it, I need a way to clear it. You'll see that in the code for the button below.

Next Record Button

Now I need to have a way to turn the translation (meaining) box off again when I go to a new flash card. There are several ways to do this but the easiest was to put it under another button. I added a "next record" button using the button wizard again, but I added some code. The whole sub looks like this.

 

Private Sub cmdnextrec_Click()
On Error GoTo Err_cmdnextrec_Click

  DoCmd.GoToRecord , , acNext    'built in code to go to the next record
  Me.meaining.Visible = False    'This turns the translation box off again
  Me.Answer.Value = Null         'This clears the answer box   
  Me.Answer.SetFocus             'this sets the cursor in the answer box

Exit_cmdnextrec_Click:
    Exit Sub

Err_cmdnextrec_Click:
    MsgBox Err.Description
    Resume Exit_cmdnextrec_Click
    
End Sub

I added a couple of final touches and the first flash card program is done.

You can see that I added a button to keep track of how many correct answers I got. I could have made this automatic, comparing the answer field with the meaning field, but I thought it would be too easy to get it wrong by omitting something like the "to" in a word meaning "to speak." So I decided to just do it manually.

I added another unbound text box and named it "correct."

Again I added a button named "cmdcount" and closed the button wizard. I needed a code to count in increments of one. Counting can be difficult in Access but this one wasn't too hard.

count code

Hiding Words

The last bit I wanted to add was a way to hide words that I had learned well enough that I didn't need to review them any longer. That little check box does that.

Remember, in the table I had included a "yes/no" field called "complete." Now I was going to add a query and filter the results with this field.

So, I built a query using the query wizard and included all the fields. I put "no" in the criteria box below. That means it will only return the records that do not have a check mark. Now I change my form to the control source "qryVocab." Every time I check that box, the program will hide that word. It's so easy.

query

Splash

Menu Page

My flash cards have made learning so much fun. Now I need to build another set, using the same table to translate from English to Welsh. It will be easy since all the hard work is done. I can just copy a lot of the code I already have written with just some minor changes.

There's a lot of more things you can do with this but this is a good start. I added a splash screen too just for fun.

 

Splash Screen

Radio Wales
Good listening

Say Something in Welsh
Free downloadable lessons

Updated: 12/23/2012, Ragtimelil
 
Thank you! Would you like to post a comment now?
10

Coding Comments

Only logged-in users are allowed to comment. Login
Ragtimelil on 07/25/2015

Glad to hear it. Sorry. I was away.

Scott on 07/25/2015

Never mind, I figured it out... in Access 2010 it's listed as "Record Source" instead of "Control Source". Silly me :)

Scott on 07/21/2015

Loved the instructions here, thank you. Did have one question though, how do you change the form to the control source?

Jeff Dixon on 12/20/2014

Thank you very much. I had the tables done for a similar database but your code to for the cards will save me a lot of time. After I get the visual cards done. I want to do the same thing with "audio cards" that will play audio terms and meaning. (Your captcha says to enter 2 words but only presents a single number.)

Ragtimelil on 07/06/2013

What I love about access is that you can do so many things with it!

kimbesa on 07/06/2013

I never would have thought to use Access to do a project like this!

Ragtimelil on 01/08/2013

You're welcome. Hope it is clear enough.

katiem2 on 01/08/2013

Very useful tip. Thanks :)K

Ragtimelil on 12/22/2012

Diolch. Let me know how they work.

JoHarrington on 12/22/2012

Da iawn!

These look really useful. I'm going to create some of my own. Thanks!


You might also like

Main Differences Between LAMP and MEAN

Which one is better? And what are the main differences between them? Let's ad...

What is: C++?

C++ is an all-purpose programming language which is based upon one of the mos...


Disclosure: This page generates income for authors based on affiliate relationships with our partners, including Amazon, Google and others.
Loading ...
Error!