VBA + Access

BarataPTBarataPT Rio-Meão, Portugal
edited February 2007 in Internet & Media
Hi,
I have an access databse and in one of the tables, i have one field that keeps the url of an imagem that i choose from the pc. My problem is that i want that when no image is selected one default will be choosed as the image. I have done that but there is the problem that if i change the directory of that default image then i have to change the url again; is there any code on VBA that for example if i put that default image on the same folder of the Database file, dont give this "error"...

Comments

  • KyleKyle Lafayette, LA New
    edited February 2007
    What is moving the image? Is it a person or a program? Is it just one image URL that needs updating, or many?

    To connect to an Access database in VBA, you should use ActiveX Data Objects (ADO). ADO is a set of objects in VBA that let you connect to a database, retrieve/alter data, etc. In your VBA code editor, you may need to go to Project->Add Reference and choose Microsoft ActiveX Data Objects Library in order to reference the ADO datatypes. A search for "ADO" on www.msdn.com should get you started. Or you can google for some examples of how to connect to a database.
Sign In or Register to comment.