Copying a form

jhahes

Registered User.
Local time
Yesterday, 17:01
Joined
Jul 13, 2005
Messages
20
I am a beginner and I am having difficulty doing the following.

I have created a form from a query, (by agent)


The form took a little while to design, and I know how to copy the form, but how do you change the agent that is being referenced without having to go create the whole form layout again.


thanks for any help

Josh
 
you don't copy the from,

you have to modify the agent filter you used in the query

does that make sense?

instead of hard-coding the parameter, you use a variable reference ie take the value from a control form, then you just have to set the control value accordingly.
 
Could you give me an example

So if I am understanding you, you don't have to create more forms.



I have 4 agents....

I have 4 queries...

Each query only has the agent's records to view..

I want the form to look exactly the same, I have custom designed.

So right now I went to create form on agent 1 query....Now I have custom designed it. So how I get the form to show Agent2 records, and only agent 2 records and so on...

I thought I would have to create 4 forms, 1 for each query (agent)

thanks for any help and explanation


Josh
 
i assume the queries are EXACTLY the same ezcept you have a field called AGENTID or something like, and in the criteria row, you have set a particular value to pick out one agent.

a first step - instead of having 4 queries you change the value of the criteria to something like [enter agent number]

now when you run the query (or open a form based on the query) Access will ask you which agent you want.

second step - instead of this sort of parameter - you put a more frindly form based parameter - so you can enter the agentid into a text box on a form, and instead of prompting you, the query gets the lookup value from the form text box

-------------------
if instead you have 4 different tables, one for each agent, then thats a different problem
 
2 more question

thanks for the explanations....

I only have 1 table

Question 1


Is there anyway to have a combobox with a drop down view when it asks what the Agents name is or does it have to be the text box? Is the response case-sensitive?

Question 2

Is there anyway to put security on this, for example, when the agent put in his id or name, it would prompt a security so that agent couldn't put in someone else's id?


thanks

Josh
 

Users who are viewing this thread

Back
Top Bottom