Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
Access SQL Seminar Part 2
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   11 years ago

This nearly five (5) hour long video seminar will pick up where Part 1 left off. You will learn more about the SQL programming language. We will focus on action queries, aliases, joins, crosstabs, union queries, aggregate functions, and more.

This seminar has several goals. You will:

1. Learn about Action queries and when to use them
2. Discover how to launch queries from VBA code
3. Create Aliases for your field and table names
4. Learn the different types of Table Joins
5. Construct a Union query
6. Work with a Crosstab query
7. Perform calculations in your SQL statements
8. Explore the different Aggregate query functions
9. Utilize string, math, time/date, and other query functions

Click here for more information on the SQL SEMINAR PART 2.

SQL2 Lesson 3 Upload Images   Link  
Ina van Rooyen 
8 months ago
When I run the VendorPriceUpdateF, and select a Category from the Category List Combo, no items appear in the List Box.
I've done the lesson twice and end up with exactly the same problem.
I'm using Access from Office 365 and do find that there are very small differences compared to Access 2010. Not sure what the issue is.
Scott Axton
8 months ago
Ina -
Nine times out of ten I find that I have a typo if things are not running properly. Quote in the wrong place or parentheses not correct, etc.  It's really hard to help you trouble shoot what is happening when we cant see what you have.
please copy and post your SQL here and that will help us move forward.

Also, open the tables and verify for yourself that you do indeed have data that should be showing up.  If there is truly no matching data that would be a whole different issue.

Are you receiving any error messages?
Ina van Rooyen
8 months ago
Hi Scott, when the form opens all the items are listed in the List Box. When I select a specific category, the list box is empty with no error message.

CategoryCombo SQL
Private Sub LogIt(Description As String, Notes As String)

    DoCmd.SetWarnings False
    DoCmd.RunSQL "INSERT INTO LogT (Description, Notes) " & _
        "SELECT '" & Description & "', '" & Notes & "'"
    DoCmd.SetWarnings True
End Sub

Private Sub Form_Open(Cancel As Integer)

    LogIt "Price Update Form Opened", "Blah"
End Sub

Private Sub RefreshProductList()

      If IsNull(CategoryCombo) Then
        WhereStr = ""
        WhereStr = "WHERE Category = " & CategoryCombo & " "
    End If

ProductList.RowSource = "SELECT ProductIDID, ProductCode, ProductName, " & _
        "Category, LastUpdated, UnitPrice, NewPrice, Profit " & _
        "FROM ProductVendorNewPricingQ, " & _
        WhereStr & _
        "ORDER BY ProductName;"

End Sub

Private Sub CategoryC
Ina van Rooyen
8 months ago
The same SQL appears in the CategoryCombo and the VendorPriceUpdateF.  Is that correct?
Kevin Robertson
8 months ago
In your RowSource:

ProductID is misspelled, you have an extra ID on the end. Also, you appear to have a comma after ProductVendorNewPricingQ.
Hope this helps.
Ina van Rooyen
8 months ago
Hi Kevin, ProductIDID was spelled like that in my table as well, although I've changed it now and I removed the comma and it still was the same. I then decided to add the SELECT statement in the CategoryCombo Row Source, which was empty, and it worked.  
Does it make sense?
Add a Reply

Show All Comments

Start a NEW Conversation
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.

You may want to read these articles from the 599CD News:

1/26/2022Yes/No Fields
1/22/2022Next Appointment
1/18/2022Access B2 Upgrade
1/17/2022Access Beginner 2 Links
1/17/2022Access Beginner 2
1/17/2022New Record on Top
1/13/2022Missing References
1/13/2022Access Beginner 1 Links
1/11/2022Access Fast Tips

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: access sql structured query language  Page Tag: whatsnew  PermaLink