access+course+training - access queries
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » access+course+training - Access queries

access+course+training - Access queries

resolvedResolved · Low Priority · Version Standard

replyReply Thu 26 Jul 2007, 11:36Delegate Lucy said...

Lucy has attended:
Excel Intermediate course
Excel Advanced course
Access Introduction course
Access Intermediate course

Access queries

When I try to run and create a query to pull out all of my stockists who we want to sell to (from a Status--- 'want' table), it returns no results. The query doesn't say it has any problems though, what am I doing wrong?

thanks,
Lucy

For upcoming training course dates see: Pricing & availability

replyReply Thu 26 Jul 2007, 16:40Trainer Richard said...

RE: Access queries

Hi Lucy

Please will you click on VIEW and then SQL. If you send me that code ni a reply to this post, I will take a look for you.

Regards

Richard

replyReply Thu 26 Jul 2007, 16:45Delegate Lucy said...

RE: Access queries

SELECT Retailer.RetailerID, Retailer.Name, Retailer.Status
FROM Retailer INNER JOIN Branch ON Retailer.RetailerID = Branch.RetailerID
WHERE (((Retailer.Status)=[the Status]));


Hi Richard,
there it is, thank you-

LR

replyReply Thu 26 Jul 2007, 16:45Delegate Lucy said...

RE: Access queries

SELECT Retailer.RetailerID, Retailer.Name, Retailer.Status
FROM Retailer INNER JOIN Branch ON Retailer.RetailerID = Branch.RetailerID
WHERE (((Retailer.Status)=[the Status]));


Hi Richard,
there it is, thank you-

LR

replyReply Mon 30 Jul 2007, 11:17Trainer Richard said...

RE: Access queries

Thanks Lucy

The SQL statement gives me a quick look at what you are trying to create. The basic statement looks fine, and what it looks like is that you are filtering using a variable [the status].

1 .
What I suggest is removing the criteria from the query, and seeing what results you get.

2.
If you get the records showing, then add just a simple critieria (ie. Yes - or whatever one of the values are).

3.
That should then filter the results yuo are looking for. If that works, then you know that the [the status] field is the issue.


If 1-3 return no results, then I suggest you look at the way you built the relationships between the tables. From what it looks like, it is just two tables, with a relationship on [RetailerID].

If this is the case, then check the type of relationship, by clicking on the line between the two tables. There should be 3 options, and depending on which one you choose, the results will differ. Generally Option 1 will give you the standard results, whereas 2 and 3 are more customised, and sometimes do not return any values.


Let me know if that helps.

Regards

Richard


 

Access tip:

Change The Default Font in Access 2003

You can change the default font in Access 2003 so that whenever you create a new database your preferred font is automatically set.

To change the default font:

1.From the menu bar select Tools.
2.Click Options.
3.Go to the Datasheet tab:
4.In the Default font section select your preferred font from the list of fonts e.g. Arial.
5.Select your preferred size from the size menu e.g. 12.
6.Click Apply.

Click on the Tables/queries tab:
1.In the Query Design font section select your preferred font from the list of fonts e.g. Arial.
2.Select your preferred size from the size menu e.g. 12.
3.Click Apply.
4.Click OK.

The default font for Access has now been changed.

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard