Passing Parameters

sakthivels

Beginner 2 Intermediate
Local time
Today, 17:04
Joined
Jun 3, 2009
Messages
23
Hello Everyone,

I have a Table tblCustomers, where I store the details about the Customers like, CustomerID, Name, Address, Contact Number (Office / Residence / Mobile 1 / Mobile 2).

I have designed a form where the user can give any of the detail like CustomerID or Name or Contact Number. and search for the Customer Record.

I also have a general query where I don't give any parameters.

I would like to know how I can utililize the query for passing parameters.

Kindly advise me on this.

Regards,
Sakthivel.
 
Hi,

Create a query based on your table and base your form on your query. This way you can specify your variable parameters within the query and when ever your end user opens up the form, they will be prompted to specifiy their parameters according to the variables you have set in your query.

FAB

John
 
Mr. JohnLee

I am sorry I don't understand you. I already have a form where I have 4 unbound textboxes One each for ClientID, ResPhone, OffPhone, Mobile1, Mobile2 and a command button.

So when the user enters any of the four values and clicks the search button. I want the results to be displayed.

I also have a query which pulls the values from the table. This query doesn't have any parrameters passed to it. Its is just a simple Select Query.

Can you please elaborate more on about passing the values in the textbox in the form to the query, so that I can put the results in a list box or a form.

Regards,
Sakthivel
 
Last edited:
Try a search on the forum for "search form" you should find a sample or two in the "Samples" part of the forum

Good hunting!
 
Hi,

From your initial post you indicate that you have a table and you also have a form and a query, what you do not say is weather or not the form is based on the table or based on the query, therefore I have assumed that the form is based on the table.

I also assumed that the query you mentioned is based on the table as well. So if you base your form on your query [which I assume is based on your table] you will be able to pass parameters directly to the query, but first you must set up your query so that it will take the parameters you want to pass to it. Once you have done that your form will display the data according to the parameters passed to it.

FAB

John
 
Mr. JohnLee

I am sorry for not giving a clear picture of my problem. I attach the Database so that you can go through and help me.

Regards,
Sakthivel
 

Attachments

Hi,

Unfortunately I can not open your test_Client DB, as it's a version higher than what I am currently using.

FAB

John
 
Try a search on the forum for "search form" you should find a sample or two in the "Samples" part of the forum

Good hunting!

Have you even tried looking for this?
 
Allen Brown has search form which I think is something to explore.

http://allenbrowne.com/ser-62.html

I used his template to get you started, but you have to finish it yourself. ;)

See the code behind your form and expand on it to include the rest of your searchboxes using my template. A new Form called frmSearchRes is added.

JR
 

Attachments

Thanks Janr,

Its working. Now that I have an idea. I'll try and reuse it. Thanks a lot for helping.

I also thank all the forum members for helping me in this thread.

Regards,
Sakthivel
 

Users who are viewing this thread

Back
Top Bottom