queries and syntax used

Dargie

New Member
Joined
Oct 30, 2003
Messages
22
Hello

I am looking for a another bit of help!
I have a field called Group in my database.
Does anyone know how to search the contents of the table to show records with a certain value.
Syntax is big downfall for me.

e.g Say group holds jim, sam, jean, helen etc

How can i use a parameter query, so that when the pop up box comes up I can enter jims name and all the records holding his name in the group field will be displayed.

I have tried various things from help, but a lot seems to be over my head and what i want to do is quite simple.
The group feild is just a text box, would i be better with some other form of control
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
If you've already built the query, open in design view. In the Criteria row below [Group], type [Please enter a the name]
Save and close. Now, every time you run the query you will be prompted for a name. This will be the filter.

Denis
 
Upvote 0
Thanks Denis

I tried what you suggested. The Dialog box is working fine and the query is running, but it comes up with one emtpy record in data sheet view, there obviously something not right somewhere.

My group field with the names in it, is Name, name, name, etc. Do you think this will be why my query comes up empty?.
All the data ive entered into the form based on my table is aaving in the table, so the text is there.

I only have 1 table, to keep things simple, as im quite a novice, but have scanned access books etc, but they dont go into too much detail about designing databases from scratch, and as you may have gathered im not an IT pro, but getting im there slowly

I think!

Cheers

Dargie
 
Upvote 0
My group field with the names in it, is Name, name, name, etc. Do you think this will be why my query comes up empty?.
Yep, that's why the query comes up blank. The Parameter query usually requires an exact match. If you want to find any occurrence of a single name in groups of names, you could try:
Like "*" & [Group] & "*"
as the parameter. This surrounds the name you enter with 2 wildcards.

Denis
 
Upvote 0
Thanks Denis

That worked great, my report is running a treat now.

Another wee question, sorry!

I also have a date field, which runs tht same type of parameter query.
Is there any way that i can have an input mask of the pop up box, so i dont have to enter 12/12/2003.
That it would display, 2 spaces/2 spaces/ four spaces for the date, so i dont have to type in the slashes.

Sorry to ask again, but i,m nearly finished. Its only taken me a month to do!!

Not without the help of you folks, I might add

thanks

Dargie
 
Upvote 0
Hi Dargie,

sorry about this one -- Access is very fussy about date formats. You'll have to enter the date in the standard format for Access to recognise it, unless you want to get fancy with forms.

Denis
 
Upvote 0
ok Nay Bother

thanks for all your help so far. really got me sorted

much appreciated


Cheers

Dargie
 
Upvote 0

Forum statistics

Threads
1,221,614
Messages
6,160,839
Members
451,673
Latest member
wella86

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top