Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-16-2017, 10:54 AM   #1
eshai
Newly Registered User
 
Join Date: Jul 2015
Posts: 86
Thanks: 12
Thanked 5 Times in 5 Posts
eshai is on a distinguished road
rename image file by a fields in a form

i build a register form for a new students is a part of a big db
now i made a popup forms asking for the student to fill up is details
id,firstname,etc'
and the important detail is an image
the popup forms work by 2 ways one menuly. I put in the details take an image of him and atech it. all the details go to a nice page that Printed and the student go for a interview. the second way is all automatic when the image is taking by "sendkeys method"
what i need is that image well rename to a name from the fields.firstname,lastname,city With a space between them
then copy the image file from c:/img to c:/pictures the file is .gif

eshai is offline   Reply With Quote
Old 12-16-2017, 11:04 AM   #2
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,568
Thanks: 68
Thanked 2,744 Times in 2,629 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: rename image file by a fields in a form

you just use FileCopy "c:\img\defaultPictName. ext", "c:\pictures\" & [firstname] & " " & [lastname] & " " & [city] & ". ext"
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
eshai (12-16-2017)
Old 12-16-2017, 11:19 AM   #3
eshai
Newly Registered User
 
Join Date: Jul 2015
Posts: 86
Thanks: 12
Thanked 5 Times in 5 Posts
eshai is on a distinguished road
Re: rename image file by a fields in a form

Quote:
Originally Posted by arnelgp View Post
you just use FileCopy "c:\img\defaultPictName. ext", "c:\pictures" & [firstname] & " " & [lastname] & " " & [city] & ". ext"
thank you so match
work great. my head was stuck on "name procedur" "old","new"

eshai is offline   Reply With Quote
Reply

Tags
access , vba access 2016

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rename and Relocate an Image tif file from information within DB JohnLee Modules & VBA 0 01-04-2012 07:04 AM
How to rename a file smiler44 Visual Basic 2 01-26-2010 12:31 AM
Rename file to txt cesarelias Modules & VBA 3 11-17-2009 09:09 AM
Rename image files stored on the hard disk RCurtin Modules & VBA 2 12-06-2005 10:47 AM
if file exists then rename file (date_1) deekras General 8 07-15-2003 05:06 AM




All times are GMT -8. The time now is 02:45 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World