using form field values in sql queries

  • Thread starter Thread starter shemeer
  • Start date Start date
S

shemeer

Guest
hi,
i created a database in access with forms and querires, and it works well.
now i want this to be moved to sql, i tried using the upsizing wizard, and i could move th tables properly. the problem is with the queries. i have used the vaules of the form fileds with in the queries to itrait the number of records returned by the queries.
eg
select name from customer where(customer.name= forms![customer search].name);
when i moved this query to sql, it gives me error. it looks like i cannot use the field names of the forms within sql query statement.
please help me to solve this problem
all i want to know is how to use the vaules(eg value in a text box) that i enter in a form with in a sql query.
i am waiting for a response
 
hi,
thanks for your quick reply...

i request you to give me one eg for each of your suggestion
1. " leave the quer as a querydef in the Access db "- i realy do not understand what you meant by this, i will be very happy if you could through som more light on this

2."create the query in VBA where the form field reference can be evaluated by VBA before the query is sent off to SQL for processing"--- this again not clear to me for the lack of my knowledge.
do you mean to use the access forms and the script that we normaly write for diffrent event(like onclickevent). whatever it is, please give me a small eg so that i can understand it properly.

once again many thanks for your quick response, hope to c u doing it again.
thanks and regards
 
Thank you very much,
I liked your second suggestion, let me try that.

Please keep this opened till i come back with the result.

thanks and regards
 

Users who are viewing this thread

Back
Top Bottom