Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter query 1

Status
Not open for further replies.

nickdel

Programmer
May 11, 2006
367
GB
Can you alter a query if not using DAO? I'm sure I have done this before but having a nightmare with this!

Thanks

Nick
 
Any chance you could explain what you want to do ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi, have a pass through query which points to a MySQL DB and I need to be able to amend it before running.

Thanks

Nick
 
You simply want to modify the SQL property of the QueryDef object ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yeh but isn't QueryDef an old DAO object? I take it there is no ADO equiv?

I was previously using an ADO command and had linked tables however the problem I'm having is with dates because I'm in the UK.

If for example I run a command with the date 13/12/2007 (uk format) this works fine, however when I do something like 01/05/2007, access see's this as 05/01/2007 and this is how my MySQL DB see's it also. It's very frustrating however putting the actually SQL into a pass through works just fine!

I'm probably not making much sense, sorry stressed out, on a deadline!

Nick
 
Always use non ambiguous dates, like #2007-05-01# ...
If your passthru query is a saved query then you'll find it in the CurrentDb.QueryDefs collection.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top