Populate Text Box by Selection Dialog

  • Thread starter Thread starter Thomas Maleski
  • Start date Start date
T

Thomas Maleski

I have a Field called StoredLocation, it will be the saved path of a
drawing file. Instead of having the user type this value in, I would
like the user to be able to select the file and have the field filled
out automatically.

How/Where do I start?
 
Its not easy to do and will involve a LOT of code. If you still want to do
it, you can probably find it documented via Google.
 
To allow the user to select the file using the standard Windows File Open
dialog, see http://www.mvps.org/access/api/api0001.htm at "The Access Web".
While that code may look intimidating, all you need to do is copy everything
that's between Code Start and Code End into a new Module (not a Class
Module), and then use code like the first 4 lines of sample code on the page
to retrieve a specific file.
 
Looking at Article 824272 I was able to select file(s) and have it populate
the list box but it puts it for every entry. How can you limit it to only one
common db line?

I can send you the mdb file if needed, I only have 5 entries for testing.
 
No, I don't want the database.

Are you saying you've got a continuous form, and that setting the value for
a particular text box puts that value in that text box on all rows? Is the
text box bound? If not, that's your problem: the text box must be bound to a
field in the underlying recordset.

BTW, the code I cited earlier is much better than the approach outlined in
that KB article. The Common Dialog control (which is what the KB article
recommends) is very prone to problems. The API approach I referenced isn't.
 
Back
Top