Modules & VBA :: Replace Line Of Code During Split Form Front End Deployment?
Aug 11, 2015
I have a database that I've split and have deployed to 7 persons.
The thing is, I have three (3) forms:
Form 1
Form 2
Form 3
...that require changing a portion of a line in each form's respective VBA codes. I need to change the directories to where an excel workbook is stored after exporting, and another is where same excel is moved to after being uploaded.
At the moment, during deployment I have to manually change the directories.
I was thinking of maybe a pop-up form with four (4) fields that allows the user to select his/her name at the start-up of their frontend app, and paste the directories in the other text boxes provided.
This information will then be used to replace the directories in the VBA.
If I were to make changes and have to redeploy, I would have to do everything manually again.
I have a split database. When the front end db is updated, i am attempting to delete the end users copy and replace with the updated version.
I have gotten as far as being able to open Database A, Open Database B with A and Close Database A, but it will not let me delete Database A from B because the procedure originated from Database A.
Apologies if this has been covered before - I promised I have searched and not found an answer.
I have just purchased the Access Development Extensions so that I can deploy my database's to users without Access. So far, I've managed to create an intallation file fine. Hwever, the database is to be used by multiple people and needs to be split.
If I create the runtime application of the frontend, all of the tables point to the backend on "my computer". I then need to give it to my client who will store the backend on thier server. How do I then make the front end (all locked becuase it's runtime) point to the backend in the new location?
I hope that makes sense.
I'm supposed to be installing this tomorrow, so any help would be much appreciated
I have a 2007 back-end db on a network share and around 15 regular users who access it through their own front-end db/interface. One user on Windows 7 is able to launch and use his front-end copy fine except when he goes to launch one form for data entry.
This form clocks and freezes the entire application. I sat with him and was able to determine that the issue is that the form_load code is never running. He clicks on the button to launch the form (done in vba) and the code never runs. If he opens the form in design view first then changes to form view, the code runs fine and there are no issues. This is his present work-around, but I had to give him an unlocked FE copy to pull it off (not ideal!).
I tried this with him on different PCs, with different front-end copies, and even in the back-end copy. Same result each time. None of the other users have this issue, and he can replicate this issue on different PCs. I'm at a loss for what might be causing this since it really seems so user-specific.
We have a spreadsheet that i upload onto a table, i use on of the fields to build a file path but if there is a special character it causes problems,i need to replace the below with spaces if they are in my field called path
I am trying to create a navigation form on a split database with front end and back end.But Access is not letting me drag forms or reports into the navigation form. Why?
I have a multiuser split db with this code on a listbox:
Code: Private Sub lstsearch_DblClick(Cancel As Integer)
' The following is the variable definition for the error handler On Error GoTo lstsearch_DblClick_Error Dim ErrorForm As String Dim ErrorControl As String
[Code] ....
The error function sends me an e-mail listing the error, user, form and sub. Ocasionally some users get error 3049 when running this sub. It is generally one user out of about 10 or so and the db keeps working fine for everyone else. I have reviewed the back end several times and I cannot find any obvious corruption signs. I have compacted and repaired it several times with very small changes is size.
I have several boxes instead of line breaks throughout my table. I would like to do a find and replace. Is this possible???
I can't seem to select the box to cut and paste it into the "find" line, which is too bad, because I might be able to get by with just replacing it with a semi-colon or something.
But, since I'm asking, I might as well go for the gold and ask how to make it show as a new line too, right??
I found in other threads how to use chr(10) and chr(13)... which I did, which created the boxes in some of the fields. (Some of the fields already had boxes). I also read where I should use vbcrlf, but I can't get that to work. In THIS thread: http://forums.aspfree.com/t38413/s.html&highlight=chr%2810%29 someone had the same problem as me, and was told to do an OnFormat Event.. and well, I'm just not advanced enough yet to figure that out. I've done modules, and sql view queries... and a lot of tweaking with the help I've already gotten here.. so I AM learning...
So... is there a way to do this? Preferably cheap and easy.
Hi, as an attempt to improve database performance, I have split a MS Access 2003 database. I have successfully split the database and saved the backend onto the server. My question is, where is the front end. or do I have to create it?
I split my database. Then got the bright idea to rename them. Now when I launch the front end (which contains the forms, etc.), I get a message saying that it can't find my backed. I've tried renaming the back end back to its original name, but its still not working.
What is the best way to fix this situation? I was thinking about opening the front end, and re-importing the tables from the back end, or, breaking the links between the front end and back end. If I re-import, should I move stuff from the front end to the back end or vice versa?
I have designed a split database( with back end and front end), I am just wondering what would be the best way to put a password for both of the back and front end.
So a while back I created a database which I use to keep track of my companies large list of products. It is very simple only 3 tables, 1 query and 1 form. After running into a problem with copying and pasting updates on each computer in the office I decided to split the database on a network drive. This worked for a bit, however I had to add new fields and modify the form, which corrupted the file. Luckily I had a backup before the split.
As far as I could tell all I had to do was modify the backend file and make a new front end. However it seems like it is not as easy as I thought it would be. How do you modify a split database without corrupting the files or using a non-split copy?
I have a module which reads a CSV transaction file line by line and adds the correct transactions to an access table and places the wrong ones in a logfile.Now some transactions are rejected twice there is even one rejected six times. Whereas one wrong transaction is processed only once. I am certainly overlooking something obvious in the logic but what. Here is the relevant code.
Code:
Function ImportCSVForConfederation(inputCSV, ORG) Dim TNO As Integer, TACT As Integer, TABLE As String, TLINE As String, I As Integer, J As Integer, K As Integer Dim FLD1 As String, FLD2 As String, FLD3 As String, FLD4 As String, LogFile As String, LogPath As String Dim Lim As String, ITNO As Integer
I am trying to use the string value from a form control as the criteria for a query. I first need to replace the "," in the string with "AND".
So far I have a module using the Replace function, but it doesn't seem to be working. I am not sure I can reference the string inside the form control directly....if I can, I might have a syntax error.
Here is my code so far:
Dim result As String result = Replace("Forms!Processing!Dataset_Acreage_Query", ",", "AND")
I am not experienced and having trouble finding the search terms to answer this question.
I am having a little difficulty with my importing in Access. Every time I import my text file, the lines will be jumbled. I have been reading up and I found this recordset code that seems to be what I need:
Code: Dim strLine As String Dim intLineNum As Integer Dim MyDB As DAO.Database Dim rst As DAO.Recordset Open "C:TestTest.txt" For Input As #1 Set MyDB = CurrentDb Set rst = MyDB.OpenRecordset("tblResults", dbOpenDynaset) CurrentDb.Execute "DELETE * FROM tblResults", dbFailOnError 'Clear tblResults
[code]....
Basically, this code will extract data from the text file as long as it fulfills the Mid$ criteria. Here's where my problem comes. Each line in my text file is of different lengths and I have to capture the entire line.
I think using the Left$ function would work, but I don't know how to determine the character count such that the entire line of text would be inserted into the table.
Another difference between what I need and the code above is that, I am required to store each line into each row of my table, meaning
Line 1 is placed in Row 1 Column 1 Line 2 is placed in Row 2 Column 1 Line 3 is placed in Row 3 Column 1 . . . Line X is placed in Row X Column 1.
I am after a script to lock a userform to the front but still be able to work on other forms.
I have an excel userform in access which does this and better still it is like a sticky note as it stays on the screen even when going to another program, but as I am working in vba all day long, every time I change something the form closes, it works great when not using vba though.
I have built an Access 2010 split database on my computer and it functions as built. My next step was to copy it to the server at work and test it. I discovered the tables had to be re-linked and so did that. As I have read in the Access World Forums in order to function as a multi-user database a copy of the front end must be placed on the individual workstation with the back end residing on the server, however the hyperlinks in the back end will not function when the copy on the workstation is run. I simply get an unable to open "filename" error pop-up. I can run the server copy and everything functions as built. I know that the hyperlinks require all the files to be in the same folder (relative vs. absolute), but if the back end contains all the hyperlinks why does the location of the front end seem to affect the operation of the back end?
I am looking for a way of creating the following: I want to be able to click a command button and have it prompt the user for input. Then take the input and replace all cases of NA with that string in field B for all records. I would prefer to have no other prompts other that the user input and a success msg box. Can this be done?
I am writing an IF Else code and need to go to a new line as the If IsNull.....are too many. Any idea how can I do this? I get an end of statement error.
Is there any particular reason I would choose to use
DoCmd.RunSQL "insert into...
Versus
CurrentDb.Execute "insert into.... ??
I am using an unbound form on the front end of my database to populate the backend tables (multiple tables). Some forms only have a few fields, while other forms have about 15 fields with 3-4 tables updating.
I am okay using the DoCmn.RunSQL , but I keeping reading on the forum that others chose CurrentDB.Execute and it has me thinking.
My database is stored on a network drive with only on front end.