Modules & VBA :: Simulate Link To Network Path
Sep 10, 2013
I have a front end and a back end access files.My user save the back end on a shared network folder like:a.b.comfolderName$..I wish to simulate this path in my local pc in order to set the linked table links.My problem is that I can not modify my pc name to be "a.b.com".How can I simulate this in my windows 7 pc ..so I can set the linked table values to "a.b.comfolderName$" ?
View Replies
ADVERTISEMENT
Jul 28, 2006
I've got a database with several users and we've had two people recently who rather than creating a shortcut to the db on their desktop copied it and then proceeded to enter their data there instead of into the one on the network.
I would like to be able to add a field on the first page they see when they open it with the complete file name / path information. I know how to do it in Word by adding a field to a header or footer. However, I can't seem to figure out how to do it in Access.
My hope is that if I can display the path and then include a dialog box when the database is opened warning users to verify they have the correct version before they enter any information.
Alternatively, is there a script I could write that would have the db check that it's the V drive copy not a C drive copy?
Any and all help will be greatly appreciated. Thank you.
Charis Wilson
Denver, CO
View 3 Replies
View Related
Apr 2, 2006
Hi there,
I want to link an excel sheet to my database but I dont want to link the location with a drive letter but instead linking the network address. How can this be achieved?
In addition, I want to startup application with a command line in a access macro and used this line but it doesnt work.
\Tgsshs11data.nl.post.comocc&sqa$OPS_ProcessesReportsAwkward est.txt
In general how can you work in access with network path strings?
best regards,
Paul.
View 1 Replies
View Related
Apr 2, 2006
Hi there,
I want to link an excel sheet to my database but I dont want to link the location with a drive letter but instead linking the network address. How can this be achieved?
In addition, I want to startup application with a command line in a access macro and used this line but it doesnt work.
\Tgsshs11data.nl.post.comocc&sqa$OPS_ProcessesReportsAwkward est.txt
In general how can you work in access with network path strings?
best regards,
Paul.
View 1 Replies
View Related
Jun 12, 2013
I have a list box that displays the contents of a back-end table that is has a new record added roughly 45 times per hour. I'd like the listbox to refresh automatically when a new record is added and, ultimately, notify the user that the new record is there. Are there any non-form events I can use to accomplish this? Right now, my workaround is to refresh the box once a minute using the form's timer. It works fine, but it's not pretty. Ideally, I could create some sort of event based on the new record being saved in the table.
View 6 Replies
View Related
Dec 6, 2006
I have 2 files with linking tables. Both are posted on the same network drive for the office to access. However some users have their drive link to drive E: and some to G:, etc. How do I get the file to automatically find what drive the user has and update the correct link in Linked Table Manager?
Thanks for your helps,
Penguin
View 4 Replies
View Related
Apr 21, 2005
I have a form with 3 textboxes. Data in any one of them will be used in a query which is run currently through a command button.
I want to run the query after the user hits Enter in the textbox after their data.
I could use the 'after_Update' event but this activates when focus is lost from the text box, or on Tabs etc - not the intended function.
Any way to simulate this? (trap the chr of the Key?)
tx
View 1 Replies
View Related
Jan 20, 2005
Hello to all
The problem that I am facing is the following. I am trying to create a form that has the following:
1. A combo box in which you select from a list of users
2. A list box which is populated when I select a user showing me the courses that they have to take
3. Another list box that is populated when I select a course showing me the dates available for that course
4. Finally a third list box which is populated by what I drag or double click on the dates list box basically scheudling the user to his courses.
The first 3 parts of this done what is left to do now is the hard part which is to be able to drag and drop the dates in the other listbox which basically maps that user to that course date and populates the corresponding table. Any suggestions on how to do this would be highly appreciated. Thank you in advance
View 6 Replies
View Related
May 26, 2014
Till now I managed to publish and save all in C:Reports. What I'm trying to do is Save to path specified in Path. DB attached.
Private Sub PrintAll_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim MyPath As String
Dim MyFileName As String
[Code] ....
View 6 Replies
View Related
Jun 18, 2012
I know how to use a callback to to action a button click directly.
But I also have a drop down list of my buttons on a form (they are dynamically created, so the details are stored in a table), I want to select a button from my drop down lists and then action the button selected.
EDIT: In short - I want to execute a ribbon button via vba knowing its Control.ID.
View 7 Replies
View Related
Jun 10, 2015
I am using Access 2010 in a split database. The intent is to place the back end and associated linked files on a server and the front end on work stations for each user. The typical user will just be searching for information in the database not altering it. My current code re-links the tables once the path is known i.e. I have to hard code it into the global constant. Is there a way in VBA or utilizing VBA to read/write to an ini file (for example) that the UNC path would automatically be updated to a global constant in my current code that can be updated automatically based on where the back end is installed.
Global Const BE_DATABASE = "192.168.2.3FMCENFMCTABLES.accdb"
Global Const BE_PASSWORD = "***********"
Global Const BE_DATABASEPATH = "192.168.2.3FMC" 'used to open files
Public Sub CreateDatabaseLinks()
On Error Resume Next 'new
Dim ws As DAO.Workspace
Dim db As DAO.Database
Dim td As DAO.TableDef
[code]...
View 5 Replies
View Related
Mar 5, 2014
I'm importing a txt file using the following code.
Now my question is, how can I make visual basic ask me to select a file to get the path and put it in a string.
And use this string in the DoCmd.TransfetText
Code:
DoCmd.TransferText acImportDelim, "IN-specification", "tblimport", "C:usersKimdesktop extfile.txt"
View 1 Replies
View Related
Aug 10, 2014
I am trying to code a button to select a file path.I get a compile error: User-defined type not defined on the following line;
Code:
Dim fldg As FileDialog
View 7 Replies
View Related
Jan 12, 2015
Im trying to programmatically (without any user intervention) retrieve the long path name for a given file. It seems to me this should be a rather easy thing to achieve using Access VBA. Ive tried using various FileSystemObject methods with no luck. Ive Googled many variants of VBA get full path without any meaningful hits. provide the first string as a parameter to some object and have it magically return the second string.
String 1: C:PROGRA~2COMMON~1MICROS~1VBAVBA7VBE7.DLL
Stint 2: C:Program Files (x86)Common Filesmicrosoft sharedVBAVBA7
View 7 Replies
View Related
Sep 18, 2014
For instance, I got some dynamic length path with filename as follows:
F:OUTDOOR9-8W1250832 ABCworking 1.3-0.6 BOARD 720.tif
Is there any easy way to get only the "working 1.3-0.6 BOARD 720.tif", which is the desired filename.
View 2 Replies
View Related
Sep 30, 2013
I am saving my word doc thru below vba code
.......
..........
doc.SaveAs ("Customers.doc")
..........
.......
Which is saving here :
C:UsersashfaqueDocuments
I need to save it to desktop or somewhere I want.
How can I specifically mention the path in my vba code to save this document at the desired place?
View 3 Replies
View Related
Jun 12, 2013
First, I'm developing both the Front End and Back End in Access 2007, and I intend to distribute the application using the Access Run Time. The powers that be will not let me use SQL Server.
The database is required to house attachments. Initially, I had created a separate back end database to store the attachments, but the file would quickly grow beyond the 2GB limit - roughly within 3 weeks. Instead, I decided to save the "attachments" in folders (named after the parent records PK ID) on the network. Using VBA, I would populate a list, based on the parent record, from which the user could select the file, do what needs to be done, then save it.
Unforunately, we're running into data security issues - all of the attachments will have private personal information - SSNs, Loan Numbers, Account Numbers etc., so they need to be stored in a location that's not universally accessible. All of the users have different permissions based on their department, acting as a very basic security level (i.e., Department 1 users will not be able to view any parent records associted with departments 2 or 3).
So I need a way for my back end to take a file located in a separate directory not normally available to the Front End User, then move that file (or save a copy that will be overwritten when re-attached to the record) to a location that IS accessible to my Front End User.
Can I create/use modules stored on the back end?
My first thought is to let the back end store the record in a temporary attachment table that is deleted when the user is done with it, but I've noticed that Access has trouble reclaiming the space when the attachment is ultimately deleted once the user is done using it, and I'll run into my 2GB limit again.
Alternatively, I could create a new .accdb file each time the record's attachments need to be accessed, and then delete that database once it's done and the attachments are returned to the secure location, solving my limit problems.
View 1 Replies
View Related
Dec 2, 2014
I have a button that adds pictures/files to a network location. So people from all over the company can do this and all pictures/files are stored in one location.
I also have a delete button, but a waning pops up and the file remains on the network.
PHP Code:
Run-time error '424': object required
Code:
My.Computer.FileSystem.DeleteFile (Path)
where Path is a string, files location on network.
View 4 Replies
View Related
Jun 16, 2014
I need to handle a code to collect a list of files at specified path to be inserted into one table fields:
file name, extension, date, size...etc
View 5 Replies
View Related
Aug 3, 2015
I have a table that contains passive and active devices. I want to find correct active device to which passive device is connected. However passive device can be connected to another passive device and after that to an active device - could be endless times a passive device is connected to passive device and then in the end to an active device. So the code needs to plot the path from beginning passive device to the correct active device.
I will include excel table with data and wanted result.
The criteria for passive devices that need its active device found, is i think something like this:
Code:
SELECT * FROM tablename WHERE [TYPE] = "D3P" AND NOT [Mark] LIKE "*ZUUM*" AND [Sort] = "Passive"
I got the result via doing excel function index-match for like 5 times and excel stalling. However I would like it to be done automatically.
View 1 Replies
View Related
Jan 29, 2015
I have some code that takes data from my database and creates an email with it. It also creates a folder and a word document. In the email, I would also like to include the file path as a link instead of just the path that it puts there now. Is this possible to do?
Code:
Option Compare Database
Private Sub SendEmail_Click()
On Error GoTo Err_open_word_Click
Dim oApp As Object
Dim path As String
[Code] .....
View 1 Replies
View Related
Jan 8, 2014
I have a table named tbl_imagepaths with fields:
ImageID
File
Folder
The command button has the code below, it works great and pops up with a window with the file name and path. I now just need the code to insert the file name and path into the table....
Code:
Private Sub Toggle7_Click()
Dim f As Object
Dim strFile As String
Dim strFolder As String
Dim varItem As Variant
Set f = Application.FileDialog(3)
[Code] .....
View 7 Replies
View Related
May 13, 2015
I need to make sure that all users on the network can access a specific network drive folder.
Most users don't have a problem but some users have the network drive mapped differently so when running the feature required their system can't find the file at that specified location.
I have the location of the files hard wired into the VBA code.
E.g. Z:INVDATACOMPANIESCompanyAASSETS Pty LtdPrecedents 2015STAGE 3A - COLLS-DEMS
The location is outside of the project address.
I need to be able to make sure the address of the folder is the same for all users.
View 3 Replies
View Related
Aug 20, 2014
I am trying to automate the function that imports Infopath (.xml) data into access tables. I can have a button run the MenuCommand, but then the users have to go through all of the prompts and I just don't trust them enough to do it properly.
All I want is the user to click a button, then it lets them browse for the desired file and then imports it.
View 1 Replies
View Related
Sep 8, 2014
I have a module that I am using to verify that file paths in my table point to valid jpg files. The table has grown quite a bit since I first created the module and it has gotten to the point where it's taking too long for the module to execute. I'm in the process of trying to change the record set for the module from the table to a stored query procedure but it's turning out to be a little tricky for me. When I execute the following module, I'm not getting any error code, it just doesn't seem to do anything at all. The bits in red are the parts I've changed. Before that the module executed as I expected it would.
Code:
Sub TestIt2()
Dim strFileName As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("QryUpdateRevisionHistory")
[code]....
View 1 Replies
View Related
Nov 1, 2013
I am trying to write some code to open an existing excel form, populate it, and save it with a custom filename in a directory that is built using variables I have declared.
The only part I am having difficulty with is setting the pathname. Here is my code:
Code:
'Build path to save file to
spath = "S:ContractsGeomatics LABSigned" & Company
'Build File name
Filename = "" & reservationNumberforForm & " " & Company & "-Payment Schedule"
'Save the payment schedule to the S: drive
'xlApp.ActiveWorkbook.SaveAs Filename:="S:ContractsGeomatics LABSigned" & Filename, FileFormat:=xlOpenXMLWorkbook
xlApp.ActiveWorkbook.SaveAs Filename:="" & spath & " " & Filename, FileFormat:=xlOpenXMLWorkbook
xlApp.ActiveWorkbook.Saved = True
View 5 Replies
View Related