Thank you John.
The problem i try to solve is to write about 200 hundred queries where only
the name of the field is different from one query to another. With many
calculations, subqueries, group by, order by but always on the same field. 
The field number works on the order by clause because it can be an
expression with no name (i.e. select price + taxes from mytable;).

i think i will use the mailing option of MS Word to generate the code !
Anyway everything must be done to day at 3pm, before my holidays !

Gilbert Clauss

-----Message d'origine-----
De : [email protected] [mailto:[EMAIL PROTECTED] De la part
de John Viescas
Envoyé : mercredi 28 juin 2006 14:47
À : [email protected]
Objet : RE: [ms_access] Field number in a query ?

Nope.  Interestingly, you can use a relative field number in an ORDER BY
clause, but not in the SELECT clause.  What is the business problem you're
trying to solve?  You could certainly generate the SQL in code using the
TableDef and its Fields collection.
 
John Viescas, author
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
Running Microsoft Access 2000
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
For the inside scoop on Access 2007, see:
http://blogs.msdn.com/access/

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Clauss Gilbert
Sent: Wednesday, June 28, 2006 2:23 PM
To: [email protected]
Subject: [ms_access] Field number in a query ?



Is there a way, in a query, to use the field number instaed of its name ?

Thank you

ex : select field_nr_1, field_nr_2 from my_table

[Non-text portions of this message have been removed]



 


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> See
what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to