Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to generically specify drive when transferring database..

Status
Not open for further replies.

kristi1023

Programmer
Jan 8, 2002
59
US
Hello All! I am running an export macro that transfers a table locally to a network drive. In my case, it's the F drive, but I can't assume that all users will be connected to the GEC031 server through their F drive. So, how would I specify the name of the drive in a generic fashion so that no matter how one is connected to this server he/she may successfully transfer the table?
 
use the computer name in stead of the drive letter...

like this...

\\GEC031\dbbackup
if that is where you f is mapped to... or what ever the way it goes... that way you're not dependent of drive letters...

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Thanks, Junior - works perfectly! Is it possible to transfer all but 2 fields from the local version of the database to the network version?
 
now that i can't help you with, though i'm sure it's possable... i'm also sure it's outside of my programming ability:)

I would suggest posting that question in the access vba fourum...

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
When you say fields I am guessing you meen the entire field or column from the table to be excluded. That being the case...Use a sql statement (or a query) to gather the fields you want then transfer that.

Hmmm, I guess thats a bit vague....let me know if this is makes sence... If not include some sample data and what you want it to end up being in the other database and I'll try to be a bit more specific.
 
Hi mflancour..Here's my problem..Within the network version, data that was submitted via the local version will be reviewed by 2 people, who will indicate their approval by checking a check box. Since the check boxes won't appear on the form within the local version, I'd like to exclude the transfer of these 2 check boxes everytime the network db is written to. My reasoning for this is that records will be reviewed and approved within the network version, but then the next time data is transferred using the local copy the network approval data will be overwritten. Thank you!
 
Hmmm... Not sure if I understand this yet, but here goes.

This could be as simple as writing an update and or append query in your network db. simply dont include the two columns with the checks in your query...and since the form in the local version does not even display these fields it wont matter if they are there at that point. This would meen that the two people checkin the data would have to run this query though..not sure if thats what ur lookin fer.

I guess I need to know how familiar you are with access/writing queries....ie is this making sence?
 
Um, if the local datase is truly local (on the persons hard drive) then the above has to be amended a bit. link the local db to the network table and have the local db run the update query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top