Go Back   CodingForums.com > :: Server side development > MySQL > Other Databases

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-22-2006, 04:12 AM   PM User | #1
crono.Serge
New Coder

 
Join Date: Mar 2006
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
crono.Serge is an unknown quantity at this point
MS ACCESS, SQL Query

Hey guys...'nother question.

What's wrong with this query
Code:
SELECT tblAIA- 2004 AIA Attendance Log.[AECProgram] FROM tbl2001- AIA Attendance Log
I'm using that statement to pull information from tblAIA and the records in AECProgram to populate a combo box.

That should be right....I just keep getting the following error when I run the form
Code:
Syntax Error (missing operator) in query expression 'tblAIA- 2004 AIA Attendance Log.[AECProgram]'
Thank you in advance.
crono.Serge is offline   Reply With Quote
Old 07-24-2006, 05:37 PM   PM User | #2
crono.Serge
New Coder

 
Join Date: Mar 2006
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
crono.Serge is an unknown quantity at this point
Update to my problem

I've gotten my query to work, but not in the way I wanted to. I want to use a combo box to pass the value to be queried: You select a value from the combo box, and click on a submit button. That runs the query with the selected value. Would that have to be done in the VB Code or in the submit buttons properties box?

The information I want passed to the query is AECClass (ranging from 001-005)

I don't think this is right, but here's the code I'm using on the submit button
Code:
    stQuery = "SELECT tbl2004- AIA Attendance Log.* FROM tbl2004- AIA Attendance Log"
    stQuery = stQuery & " WHERE " & cboAECSearch.Value & " = 'AECProgram'"
    stDocName = stQuery
    stDocName = "qryAECClass"
    DoCmd.OpenQuery stDocName, acNormal, acEdit
Thanks again!
crono.Serge is offline   Reply With Quote
Old 07-24-2006, 10:14 PM   PM User | #3
Antoniohawk
Senior Coder

 
Join Date: Aug 2002
Location: Kansas City, Kansas
Posts: 1,518
Thanks: 0
Thanked 2 Times in 2 Posts
Antoniohawk will become famous soon enough
Moved to Other Databases forum.
Antoniohawk is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:34 PM.


Advertisement
Log in to turn off these ads.