Ok here is my sql view of my genre query:
SELECT [Music Table].TitleID, [Genre Table].Genre, [Music Table].Composer,
[Music Table].Arrangedby, [Music Table].YearofPublication
FROM [Subgenre table] INNER JOIN ([Genre Table] INNER JOIN [Music Table] ON
[Genre Table].GenreID = [Music Table].GenreID) ON [Subgenre table].SubgenreID
= [Music Table].SubgenreID
WHERE ((([Genre Table].Genre)=[Genre:]))
ORDER BY [Music Table].TitleID, [Genre Table].Genre, [Subgenre
table].Subgenre;
Ok, now ive made a switch board item so that they only have to hit the Genre
Report button...when they hit that a prompt comes up and asks them for the
genre...when they type in the correct genre the report comes up in Word fine
and dandy...but if they type in a wrong one the report comes up in word with
all the headers but no data in them obviously....all i want is that when they
type in the wrong genre a prompt will come up and say you have entered an
invalid entry and then list the genres and have them pick it...thats all i
want..and my query is a parameter query in case u were wondering.. Thanks! I
appreciate the help!
I'll try once more. I understand you quite well; yes, I knew it was a
parameter query from the first, and all of us were suggesting that you
*still* use a parameter query, just a different and better parameter
query.
Create a Combo Box named cboGenre on your switchboard table. Base it
on [Genre Table], or a query sorting the genres alphabetically.
In the query above replace the parameter [Genre:] with a different
parameter:
[Forms]![Switchboard]![cboGenre]
Now the user will be able to SELECT a genre from the combo box; the
query will look at the Switchboard form and see which genre the user
has selected. The user can type the first letter or two of the genre,
and the Combo's autoexpand feature will jump right to the desired
genre.
If you insist on doing it the hard way, you'll need a new Form, a new
Query, and some VBA code to determine that an invalid entry has been
made. You'll end up with exactly what I'm suggesting above but with an
extra step and a lot more work. I'll be willing to put that together
for you at my standard consulting rates; if you'ld rather do it the
easy way, suggested above, that's free.
John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps