469,271 Members | 1,755 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

database and query

have a database using dao, can access the database fine. want to get a
specific record in the database from the use entering an id code and
finding the match in thre databade ( access 2000), the database field
is autonumber type. my statement is
:
:("SELECT * FROM racers where [racer id]=xxxxxx")
:
:where racers is table
:racer id is the field in the database and
:xxxxxx is a text box on my form
:
:it works fine when xxxxxx is asigned a fixed value like 25

Jul 17 '05 #1
1 2156
steve watton <sw*****@nf.sympatico.ca> wrote in message news:<7R******************@ursa-nb00s0.nbnet.nb.ca>...
have a database using dao, can access the database fine. want to get a
specific record in the database from the use entering an id code and
finding the match in thre databade ( access 2000), the database field
is autonumber type. my statement is
:
:("SELECT * FROM racers where [racer id]=xxxxxx")
:
:where racers is table
:racer id is the field in the database and
:xxxxxx is a text box on my form
:
:it works fine when xxxxxx is asigned a fixed value like 25


Build the SQL statement as a text string and then execute it.

"SELECT * FROM racers WHERE [racer id]=" & Me.Control.Value

if your control is numeric, then you don't need quotes around it. otherwise:
Field Type Delimiter
Date #
Text '
Numeric {none}

Hope this helps a little.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by RibGnaw | last post: by
3 posts views Thread by Bob Bedford | last post: by
3 posts views Thread by josh.kuo | last post: by
10 posts views Thread by eholz1 | last post: by
15 posts views Thread by harvey | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.