creating query ms access

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Creating a query in MS Access

Creating a query in MS Access

resolvedResolved · Low Priority · Version 2003

Tim has attended:
Access Introduction course

Creating a query in MS Access

Hi, having had the Introduction to MS Access 2003 course on 2 Feb, I have now received the post-course reference manual (all 105 pages of it!) but there is no mention of Queries in it, and this is one of our principal requirements.
We have three databases of names (which don't need a relationship), from which we need to extract queries of who was in the UK during any given two-month period. Anthony Malone said that the way we were doing this was inefficient, not to mention wrong, and that we could set up a query that would ask for start and end dates for the period required each time it was clicked on before producing a table of results. I have created a query, taking fields from one of the three databases in question, but can't make the above happen. I seem to remember something about putting <[Enter] and >[Enter] in the two date columns but this isn't working.

RE: Creating a query in MS Access

Hi Tim, thanks for your query and sorry to hear about the lack of information about queries, we will address that.

In your queries, your date requirements were "hard wired' in. In the training session we replaced those hard wired dates in the criteria boxes with:

Between [Enter Start Date] And [Enter End Date]

This will trigger two input boxes with the text in square brackets on each one and the dates entered will be fed back into the query. In this way, you can enter your date requirements far more easily that editing the query itself each time

I hope this helps. Let me know how you get on.

Anthony

RE: Creating a query in MS Access

Hi Anthony,

Done! I had to add a < and a > before the square brackets in order to capture the two-month period, so I was on the right lines - it was just a matter of knowing what to put in the brackets. Anyway, thanks for your help (and it won't be the last time, I guarantee!) - it works a treat!
Can you check-out the reference manual please and forward any stuff about queries that ends up going in.

Cheers,

Tim

RE: Creating a query in MS Access

hi Tim

Thanks for your question

The type of query you are referring to is called a parameter query. In the example give, you would use the following syntax

Between [Enter First date] and [Enter second date]

Hope this helps

Regards

Stephen


 

Access tip:

Hide Access Tables

One method of stopping your Access tables appearing in Database window, is to rename the table(s) with the prefix usys.

This converts the table into a system object, which cannot be viewed in the Database window.

You can show system objects in the Database window by the following:

Step 1: On the Tools menu, click Options.
Step 2: Click the View tab.
Under Show, select the System Objects check box.
Click OK.

View all Access hints and tips


Server loaded in 0.09 secs.