kevie192
02-19-2008, 11:32 PM
Hi all,
I'm creating a database for agents to use at work. Because they will all be using it at the same time, I need to create a combo box on the form that will filter the contents to only show those with their name in them. Is this possible?
Thanks!
gemma-the-husky
02-20-2008, 12:26 AM
base your forms reports on a query that selects a single agent
now how do you choose your agent - if you use a drop down, then any agent can get at any other agents details
so yuo may be forced to enter the murky world of access security, and force your users to login etc - its non trivial
kevie192
02-20-2008, 12:48 AM
OK, this seems like a better idea...
Can I make the default value of a combo box equal to a value entered in a text box in the form header?
gemma-the-husky
02-20-2008, 01:52 AM
just put mycbobox = mytextbox in an appropriate event handler
BUT ... you probably wouldnt do that, as it achieves very little
you would just select an item from the drop down, since this is the same thing.
It comes back to how you were expecting to get the value INTO the text box in the first place. As I say, if this is just for ease of display, and you dont mind users being able to see sata for other users, its easy. If you want to limit what each user can see, its much harder for you to programme
kevie192
02-20-2008, 03:51 AM
OK, Maybe I should take a step back and explain what I want a bit clearer.
I have a field in the table called "Agent Name". I want the form to work such that each user can display just the records with their name on it and today's date. There are no issues with each user seeing each other's records if they want to.
I've currently got a query with [Please enter your name:] as the criteria to sort by agents name and =date() as the date. That seems to be working fine.
What I also want, however, is for the "Agents Name" combo box to then be automatically filled in with the name that the User inputs in the first place, to save them having to type it or select it every time.
I've set the default value for the date to be set as today's date so that's no problem.
Also: Is there a way to "Store" a letter in word format inside the database to mail merge from the data? Would this need to be done inside a report?
Thanks so much for your help!
gemma-the-husky
02-20-2008, 06:06 AM
i see
when you enter a parameter that way, its immediately "forgotten" i think
the normal way of doing this is to select the agent FROM A combo box that contains a list of the agents, then use this reference on the query - it makes the query more flexible, and then of course you have the agent value to hand
the other thing is that normally you would store an agent refno, and in a lookup table get the agent name etc, corresponding to the number. That way you can store other details about the agent (name address phones email etc)