Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gather sql code output and randomly use

Status
Not open for further replies.

03Explorer

Technical User
Sep 13, 2005
304
US
I am working on a (supposed) simple project for my daughter. I am building a spelling test application. I have tables built and know the sql code and am aware of getting to the data with vba. But my concern is I don't want the information data coming back in the same order each time.

Objective is to enter the spelling word along with a sentance. Have code read data based on grade (I have two grade school kids), book and theme (which are all numbers) I use these to filter for current week spelling words. My filter would then give me the words for the specified period along with the sentance entered. Then I would have my child run a form that randomly chooses words with the grade, theme & book selected. The words would then be spoken to them, followed with the sentance spoken. I have the code in place to speak the words, but my kids know the words based on their placement in their spelling list, not actually the word.

Am I making something impossible for a personal goal to create this thing?

SO far I have two tables

TABLE1:
spellingWord (TEXT)
spellingSentance (TEXT)
gradeID (number)
bookID (number)
themeID (number)

TABLE2:
IntGrade (number)
intBook (number)
intTheme (number)

I am almost certain I don't need Table2, and I could do a self join, but I am still working on the structure idea also...

 
I'm deducing that you simply want to grab a record at random from your dataset. I Performed a Google search for 'ms access return random data' and found this link in less than 30 seconds.


Check it out and let me know if this is what you are looking for.
 
Sorry Explorer, First of all, i'd be surprised if your objective can not be reached through ACCESS, but i'm a bit lost on the objective.
At first it sounded like 2 criteria were entered, Word & Sentence. But then you implied "AND" Grade, Book & Theme?

So all 5 criteria will determine, what defined list of words & sentences will be retrieved?

If all 5, sounds like a very exponential result.
...so many different ways the results can be filtered.

So do you need a table, just with a list of words, that have a foreign key "fkGradeID", linking them to Grade?


Do you need a table of sentences with a foreign key "fkWordID", linking them to tblWord? etc...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top