RE: Proper Query Type

From: '69 Camaro (ForwardZERO_SPAM.To.69Camaro_at_Spameater.orgZERO_SPAM)
Date: 03/08/05


Date: Tue, 8 Mar 2005 05:29:03 -0800

Oops. I forgot to fix some of the syntax besides the single quotes in my
earlier post. It should read:

    SQL_Students = "SELECT * " & _
                   "FROM Students AS S1 " & _
                   "WHERE S1.Majors = '" & CurrentMajor & "';"

    SQL_CWtable = "SELECT * " & _
                  "FROM CWtable AS C1 " & _
                  "WHERE C1.Majors = '" & CurrentMajor & "';"

Sorry for any confusion.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts, so that all
may benefit by filtering on "Answered questions" and quickly finding the
right answers to similar questions. Remember that the best answers are often
given to those who have a history of rewarding the contributors who have
taken the time to answer questions correctly.

"'69 Camaro" wrote:

> Hi.
>
> > I posted yesterday about trying to use a MakeTable query to auto assign
> > College Weekenders to Students. You can get all the info from the post "How
> > do I use a record only once when making a table from a query?" posted on
> > 3/6/05.
>
> Don't be surprised if folks don't jump at the chance to help you on this
> thread after you started, then quickly abandoned, the last one. It's
> considered discourteous to abandon a thread that several people have taken
> the time to offer help with until all avenues have been addressed on the
> original thread, or one of the participants suggests that a new thread be
> started, or several days have passed and no new information is being
> discussed.
>
> If you have time constraints restricting the amount of time that you can
> spend on this problem, then I would suggest calling Microsoft tech support
> (free for first incident, but $245 per incident thereafter for phone support)
> or hiring a consultant (often with more reasonable prices), who can help you
> overcome each hurdle, often within minutes.
>
> > I want to make sure that I am using the right query type.
>
> Perhaps. It depends upon the situation. Remember that a properly
> normalized database stores data in one place, so creating a make table query
> to produce a new table from data already stored in the database can make
> sense if a large data set is used and speed is needed -- and none of the data
> in this new table will be updated (updates, adds and deletes should occur on
> the source tables only, with the new table created from the Make Table query
> to get the latest data as needed). Otherwise, the data set can come from a
> SELECT query, which is likely to be less work to maintain data integrity and
> will use less disk space.
>
> > Also I
> > have not had much sucess with the code provided in the post.
>
> Please tell the respondents in the original thread exactly what is not
> working and give them a chance to help.
>
> A quick glance at some of the code that you may be having problems with
> reveals SQL statements that assume your Majors field is a numeric field.
> (You didn't say otherwise.) If this field holds a string data type (Text or
> Memo), not numerical (Number, AutoNumber, Currency), then the string must be
> enclosed by either single quotes or a pair of double quotes to delineate the
> beginning and end of the string. It's often easiest to use single quotes,
> such as the following:
>
> SQL_Students = "SELECT * " & _
> " FROM Students AS S1 "
> "WHERE S1.Majors = '" & CurrentMajor & "';"
>
> SQL_CWtable = "SELECT * " & _
> " FROM CWtable AS C1 "
> "WHERE C1.Majors = '" & CurrentMajor & "';"
>
> I suggest asking Duane and Chris for help on any of the rest you may be
> having problems with.
>
> HTH.
>
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips.
>
> (Please remove ZERO_SPAM from my reply E-mail address, so that a message
> will be forwarded to me.)
>
> - - -
> When you see correct answers to your question posted in Microsoft's Online
> Community, please sign in to the Community and mark these posts, so that all
> may benefit by filtering on "Answered questions" and quickly finding the
> right answers to similar questions. Remember that the best answers are often
> given to those who have a history of rewarding the contributors who have
> taken the time to answer questions correctly.
>
>
> "altonomus" wrote:
>
> > I posted yesterday about trying to use a MakeTable query to auto assign
> > College Weekenders to Students. You can get all the info from the post "How
> > do I use a record only once when making a table from a query?" posted on
> > 3/6/05. I want to make sure that I am using the right query type. Also I
> > have not had much sucess with the code provided in the post.



Relevant Pages

  • RE: DBLookup problem in a query
    ... This can be single quotes or a pair of ... Beware to those who use munged addresses: known newsgroup E-mail harvesters ... Community, please sign in to the Community and mark these posts as "Answers," ... > I have a problem with a dblookup in my query. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Filtering on a subreport
    ... fine - the query includes Locations.community and community.county which is ... The code works in the sense that it is opening the right report, ... info in it (with, among other fields, the Community, and the only similar ... but it still did not filter the report. ...
    (microsoft.public.access.reports)
  • Re: Problem w/date parameter report
    ... I think I need to have separate tables for each community to show it all ... separately in my query. ... that includes all the data needed by the report. ... sort the criteria and give the totals by date range for each category. ...
    (microsoft.public.access.reports)
  • Re: Filtering on a subreport
    ... EXISTS (SELECT Community FROM Locations WHERE ((Locations.OrgID = ... You need to work on the way you build the string until it generates this kind of result. ... > (except the query in my choosecom combo box code (and the combo box> works ... >>> dialouge box where the user chooses the community from a list ...
    (microsoft.public.access.reports)
  • Re: Filtering on a subreport
    ... Note that the WhereCondition won't be applied if the report is already open. ... (except the query in my choosecom combo box code (and the combo box works ... dialouge box where the user chooses the community from a list instead ... but it still did not filter the report. ...
    (microsoft.public.access.reports)