"THIS MAY NOT BE POSSIBLE" Help Pleeeze Linking .jpg using code

mshelley1

Carbo
Local time
Today, 07:11
Joined
Feb 12, 2006
Messages
45
Operating System: WinXp Pro
Access 2000 (9.0.6926 SP-3

Problem:

I have a form named “Department Employee” on it is a bound object frame named “Photo”; I am having trouble writing code that will allow me to select a .jpg from a floppy, rename it to the current record number, store it in a directory and link it to my form for viewing. I would like to perform this using a button named “Command342”

Thanks in advance


Private Sub Command342_Click()

Is it possible to write vba code that will perform the this function?

1. Move a .jpg image from - A:\ (Floppy Drive)
2. Rename it to the value of textbox1.value
3. Move it to a directory named Photos at H:\Generald\Images
4. Link it to a bound object frame named “Photo”

Form Name: Department Employee
Table Name: Employee Id
Object Name: Photo
 
Various vba commands can be used - check help for syntax

dir will parse a directory for file types
name will rename a file
filecopy will copy a file
kill
 
sorry

kill will delete a file

these should give you what you need
 

Users who are viewing this thread

Back
Top Bottom