By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,461 Members | 2,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,461 IT Pros & Developers. It's quick & easy.

Best way to convert query to VB SQL?

P: n/a
Anyone have any tips on how to "convert" queries created in the Query
By Design to SQL for VBA in Access? I particularly have difficulties
with all of the quotation marks involved with parameters when
converting QBD queries (SQL) to VBA sql.

Any suggestions?
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Huh? SQL in the Query Def (what you're calling QBD) is the same that is
used in VBA. Can you show us the 2 examples of SQL from the Query Def &
"VBA sql" that you are having problems with?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQRz8lIechKqOuFEgEQLrcgCfT6BhhjFjhlMX64Bzsj1B0y cf+VoAoJ7J
08jkQmK9QJ/YJh2TUOGHxjOm
=lAIc
-----END PGP SIGNATURE-----
John wrote:
Anyone have any tips on how to "convert" queries created in the Query
By Design to SQL for VBA in Access? I particularly have difficulties
with all of the quotation marks involved with parameters when
converting QBD queries (SQL) to VBA sql.


Nov 13 '05 #2

P: n/a
so*********@hotmail.com (John) wrote in message news:<90**************************@posting.google. com>...
Anyone have any tips on how to "convert" queries created in the Query
By Design to SQL for VBA in Access? I particularly have difficulties
with all of the quotation marks involved with parameters when
converting QBD queries (SQL) to VBA sql.

Any suggestions?


So what's the big deal? When you create your own SQL statements in
code, you use single quotes, but in the QBE grid you use double. Gee,
that's tricky! Try playing with the Replace function.
Nov 13 '05 #3

P: n/a
Mike,

I'd guess the original poster is having trouble with the extra quotes and
where to use them in concatenating strings. Those are not obvious, for
example, when a reference to a control is used in the Query Builder.

But, the only way we are likely to be able to help is if the OP will post
some specific examples that are giving trouble.

Larry Linson
Microsoft Access MVP

"MGFoster" <me@privacy.com> wrote in message
news:p0******************@newsread1.news.pas.earth link.net...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Huh? SQL in the Query Def (what you're calling QBD) is the same that is
used in VBA. Can you show us the 2 examples of SQL from the Query Def &
"VBA sql" that you are having problems with?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQRz8lIechKqOuFEgEQLrcgCfT6BhhjFjhlMX64Bzsj1B0y cf+VoAoJ7J
08jkQmK9QJ/YJh2TUOGHxjOm
=lAIc
-----END PGP SIGNATURE-----
John wrote:
Anyone have any tips on how to "convert" queries created in the Query
By Design to SQL for VBA in Access? I particularly have difficulties
with all of the quotation marks involved with parameters when
converting QBD queries (SQL) to VBA sql.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.