List box in a separate form

mohamad630

New member
Local time
Tomorrow, 02:35
Joined
Jun 6, 2012
Messages
2
Hi, I have different tables with different forms to update them (hereafter "Mother forms".
on each of these mother forms user needs to update an origin and a destination of a transportation process (Called "LOcode") both of which are queried from a multi-table query (places query).

What i have done is that i have created a form enabling the user to enter parameter values (such as continent, region, country, province or city name) to find their desired location (places query form), and then the shortlisted results are opened in a list box (called "placeslist") in another form (called "places query list") from which the user is supposed to choose the right location, then i can design an "OK" button on this form for the user to confirm their choice.

places query form is activated with a code in the "on click" event in the LOcode field in my mother form, and then the "ok" button runs the query with the given criteria and opens the results in the "places query list" form.

I have two questions here:
1- How to update the "Locode" field with the value that has been selected by the user in "placeslist". remember that i can not address any specific "locode" field in the "Ok" button code of "places query list" form since i want to use the same form for updating other forms and field of similar character.

2-bound column in "placeslist" listbox is "ID" which i want to store in the table which my mother form updates, however i want to show the "city name" to the user in the form after update.

I would appreciate your help and suggestions.

Thanks
 
Hi Mohamad
Are you not complicating matters by having so many tables.
Could you not simplify it down to (at least) PROVINCE if not City Name?
For example, If One table had continent, region, country, province as fields (Combined, they are the primary key), You could reduce the overhead by simply searching for only the province.

So on your form, the drop down list can display the fields in reverse order. (Hide the linked key field - RecordID)

If 2 countries have a province of the same name, the user just needs to select the record in the appropriate country.

Does this simplify your problem?
 
Thank you liddlem for your response,

what you are suggesting is possible and would make it easier for me to develop but may not as user friendly as the other solution.

Still i would be looking to find a way for especially question number one as i may have to apply it else where in my software as i go ahead.

Thanks
 
Are you able to post your db so that we can see what you're trying to do.
I think that I am not understanding exactly what you want to do
 

Users who are viewing this thread

Back
Top Bottom