|
-
Nov 11th, 2003, 05:55 AM
#1
Thread Starter
New Member
Use current database
I am brand new to vba so hopefully this will be an easy question for most of you. I have an access database with a form and a button. When I press this button it runs some vb code which moves some files around on our network. What I want to do is to insert into a table (also in the same database) the filenames and a status depending on whether or not the file was moved successfully.
Now I am ok with creating connections to other databases but how do I tell it to use the current database?
Hope you can help! Thanks.
-
Nov 11th, 2003, 06:42 AM
#2
Addicted Member
Hello,
You can use the following
Code:
CurrentDb.Execute "insert into logtable (status, filename) values (" & txtstatus & "," & txtfilename & ")"
where txtstatus is the status
and txtfilename is the file
kind regards,
V-Software
-
Nov 11th, 2003, 06:58 AM
#3
Thread Starter
New Member
Thanks for that! I was hoping it would be that simple!
-
Nov 20th, 2003, 10:47 AM
#4
Banned
hi
can u explain this code agian
biswajit das
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|