General :: Error Message If Current Date Of A File Is Not Correct
Feb 14, 2014
I have a vba code export a error message if the current date of a file is not correct.. I have tested the code it worked to send a error message to a error.txt file but he it doesn't look to the modified date
So instead of:
file1.txt (13-02-14)
Then
Send error message ("file not updated") to: Error.txt
IF NOT
no action requeried
This code does the following :
file1.txt (Modified date: 13-02-14)
Then
Send error message ("file not updated") to: Error.txt
file2.txt (Modified date: 14-02-14)
Then
Send error message ("file not updated") to: Error.txt
Code:
Sub CheckD()
Dim FSO As Object: Set FSO = CreateObject("Scripting.FileSystemObject")
Dim objFile As Object: Set objFile = FSO.GetFile("C:Users
ameDocumentsShow5621.txt")
If objFile.DateLastModified <> Date - 1 Then
[Code] .....
So also if it is the current date he send the error message to the error.txt file, it could be possible that i did something wrong.
View Replies
ADVERTISEMENT
Sep 5, 2012
I am trying to get the message Request added to show up when the new record command works.
The message "add button error" show if there are any errors, rather than just doing nothing and stopping.
However when it works I get both, I know I doing something very simple very wrong.
Private Sub bAddRecord_Click()
On Error GoTo errorhandler
RunCommand acCmdRecordsGoToNew
MsgBox "Request added "
On Error GoTo 0
errorhandler:
MsgBox "add button error"
End Sub
View 3 Replies
View Related
Jun 7, 2005
Not sure what is happening here...
I keep getting an error message saying 'No Current Record'...especially when trying to create a new form or report using wizard.
I don't have this problem at home..only in work.
Any ideas?
Cheers
View 1 Replies
View Related
Jul 14, 2014
I created a split database. The backend went on a shared network drive where all my users have read/write priviledges. Then I gave each of my users a copy of the front end that they put on their local computers. According to all of my research, with this setup Access is suppose to allow multiple users in the database simultaneously. However, if anyone tries to open the database when someone else is already using it they get the error message "file in use".
I've confirmed with IT and the Admin for the folder that all of my users have read/write priviledges to the shared drive housing the backend. There are only 6 users and usually it is only 2 who want to use database simultaneously.
My IT person said that they have heard this type of problem with Access before. Usually, people have to shell out money and get a server because Microsoft's claim that Access can run on a shared drive is usually untrue.There is no way I'm going to get a server so I have to make the database on a shared drive work.
View 14 Replies
View Related
Jan 21, 2015
My requirements is to send the alert messages with the approaching due date on every Monday of the week. I am able to send alert messages on Monday. My Problem is: How to send alert messages on Tuesday if Monday is Vacation. Is there a way to do it in access? I don't have much experience in access.
View 6 Replies
View Related
Apr 28, 2004
I was working with one access application 2 months ago and I stoped. Now, I opened this access file and try to continue with it.
But I have problem! On every button, when I click on this button (it could be button for cllosing form or any other) there is one message box with followed text:
"Error accessing file. Network connection may have been lost."
I have no ideao what is going on! Even, when I create new form, put the button on it, when I click on this button, the same message appears.
Can someone help me? What is wrong with with my Access or with my Windows.
P.S.
I have Pentium IV, 512 MB Ram, Windows XP, and MS Access 2000.
Please, do send me an e-mail on dculic71@hotmail.com
or contact me on ICQ (101967172)
View 2 Replies
View Related
Jan 10, 2014
In a query I would like to extract the last ten years. This is what the data looks like:12/13 (Data type = text)(Short for 2012/2013 which actually represents 7/1/2012 to 6/30/2013.)
I am able to extract the "12" and turn it into the general number 2012 using: ("20" & Left([TAXYR],2))*1..But how can I convert that to the data type-date so I can include those records in the past ten years from todays date? I was trying to use DateAdd but I think the problem is the data type and where converting to date gives me "1905" or "9/##/1905." I get why it does that, but is there a workaround? Maybe adding 39,785 days?? (2014-1905)*365
View 4 Replies
View Related
Jun 4, 2012
It is my understanding that a custom macro was built to pull text data from a file and import it into Access in the appropriate fields. This macro no longer works and will return the following error message:
"License information for this component not found. You do not have an appropriate license to use this functionality in design mode."
It only gives an option to click OK. When you do it shows a box called "Action Failed" that lists the macro name, condition, action name, and arguments with three button to click on the right of the box: "Step" "Halt" and "Continue". It appears that only the "Halt" button is available to be clicked.
Does this sound like an issue with the Access license or whatever license the macro might have? We're trying to decide if it's possible to restore the functionality of the macro.
View 14 Replies
View Related
Jun 22, 2014
The following code is used in calculating the due date for actions. The due date for each action is calculated from a preceding action date, by adding a defined number of days. The relationship between the actions is defined by assigning the predecessor/preceding action.I am trying to use a nested loop to firstly assign the criteria data agaisnt which the rest of the record set must be checked in order to determine if the criteria data is a predecessor and than to use the predecessor's information to calculate the due date for the record being checked. I keep on getting a no current record error at the .edit inside the nested loop.
'**Calculate action Dates
Public Sub CalculateDates()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Dim NumOfRec As Long
Dim CritCounter As Long
Dim EvalCounter As Long
[code]...
View 2 Replies
View Related
Apr 16, 2013
I routinely export queries etc from my development database to the 'live' master database used by users. Every so often I get the error message 'The database Mydatabase.accdb is read only'. Then I can't export anything to it. I don't know why it should suddenly become read only. How do I make the database changeable, and not read only?
View 3 Replies
View Related
May 9, 2014
I have a report that shows weekly schedules (each week start with Sunday date for the row) for multiple teams (columns). It prints 1 year at a time.I have to add the Sunday dates by hand into the table for each year. I have added 2016 but when I generate the report I get a "no current record" error.By the way, I am not a "programmer" but I can usually figure out whats going on when we have a problem by looking at other code in the system and by finding answers for similar problems on the forum!!
View 1 Replies
View Related
May 10, 2014
I have been working on a bound form that I can't seem to get working.
It records deliveries and what I am trying to achieve is after the form has been filled in the user will click a save button where the record will be added to the table and a record automatically printed via a report and emailed to the shop manager, but i keep getting the error "No Current record" no matter what way I try to do it, I have tried using to run the report. Is the best way for me to accomplish this o change it to an unbound for and run an insert query on click?
I have attached a copy of what I have been working on : DatabaseDelivery.accdb
View 2 Replies
View Related
Apr 2, 2013
What i am trying to do here is that if the date is not equal to current date, reset count or something to that effect.
Code:
(Select count(*) from [qry_01] where [id_employee] = a.[id_employee] and [datex]+[timex] <= a.[datex]+a.[timex])
View 1 Replies
View Related
Dec 17, 2013
We have a database with PROPERTY_ID and DATE and COSTS
The database is sequential and complete up to some point in time but some records stop short of a current date. (The DATE is represented by months)...
#1 #2
01/31/2013 10/31/2013
02/28/2013 11/30/2013
03/31/2013
Some records go thru 2012 and some to current date of NOV 2013.
To normalize the data we need to create blank records for each PROPERTY_ID thru Nov 2013 beginning with the last record for the PROPERTY_ID.
For the example we need to create APRIL thru NOV 2013 for PROPERTY_ID #1
View 10 Replies
View Related
Sep 24, 2013
I have a database that is tracking donations for my organization. I have some members who donate the same amount every month. Is there away to copy the records and paste them with the current date in the "Date Paid" field, and do this "Update" once a month? As opposed to typing in 200 records each month? I would assume that I would have to run an update query which filters to just the members that pay each month, but the big question is how to copy and paste these records. I am using Access 2010, I have some VB ability, but not an expert by any stretch. My SQL is not strong at all either.
View 3 Replies
View Related
Jul 5, 2012
Having a bit a brain freeze today. I have a field that auotmatically puts a date in when a checkbox is checked I am now trying to add a field which returns the day of the week from this date. Brain now mashed I am sure it's pretty simple but I just can't get it to work
View 5 Replies
View Related
Feb 3, 2014
I have an access database that has been written by someone else (I am a novice when comes to access!) and to which I have been asked to regularly upload data from excel.
There is a Macro written to load data from spreadsheets, and generally this works without problems. However there are a few spreadsheets which come up that result in a message box saying "Error in [name of spreadsheet] xls file in row 0" - I have checked for errors and null values in the spreadsheet but have seen this before as it generally tells me the error is in row 245 for example, but have never seen this error in row 0 before!
View 5 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 24, 2015
I have this report that needs to be export - 1 report per record
The report exports out but its the same record export out each time ( the name changes - but the data doesn't)
Code:
Private Sub Command0_Click()
Dim MyDb As DAO.Database
Dim rsemail As DAO.Recordset
Dim RefernceNumber As String
Dim FilenameZ As String
Set MyDb = CurrentDb()
[Code] ....
View 5 Replies
View Related
Apr 4, 2014
How to add the date to the new file that is copied with the code:
xcopy /s C:UsersGeneDesktopFolder1DBMain.accdb C:UsersGeneDesktopFolder2
I have looked everywhere, copied various codes that said it could be done, but I still can't get it to work.
What I want to to have the new file in Folder2 be DBMaind_DateAndTime
where DateAndTime would be the Date and Time that the copy was made.
View 1 Replies
View Related
Jul 11, 2007
I have a button in the form of the current access file. What I want to do is when the user click on the button,
triggered the vba to backup current access file. But since the file is currently open, is this possible? If yes, may I know how to do it with vba?
I have tried two methods but failed:
1) Use copytofile method, but I get permission denied due to file open;
2) Use dbengine.compactdatabase method, but it also has problem if the file is open.
View 3 Replies
View Related
Sep 14, 2005
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(" coordinatordbTC.mdb")& ";PASSWORD=123456")
================================================== ===================================
I have been trying solve this problem for a few days.
however, the best i can come into is the above code, however , the following error still approached me.
================================================== ===================================
Microsoft JET Database Engine error '80040e4d'
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
================================================== ====================================
Kindly , someone can help me in this coding . Thank you very much
View 1 Replies
View Related
Apr 10, 2014
I want to use the create date of a file which is stored as a linked table in my Access 2010 database. I have attempted this by creating a query (qrysysObjects) using the MsysObjects and that gives me the filename of the linked tables, well almost - a few are csv files and this does not have the file name in the database field text, but I have found it in the foreignname field except it is name#csv rather than name.csv so I can't simply concatenate this in a query.
I know there is a function called FileDateTime which you can use in vba or a query but can you use a variable with this rather than the actual path name? I tried this in the query qrySysObjects but it said unknown function.
View 2 Replies
View Related
Aug 27, 2013
What I really need is for when the form opens, it looks at todays date, then matches current user and then goes to that record for today, if no current user there, then will goto new record..
i know, sounds complicated, and probably is really easy, but my heads not with it today, as about to get drunk as its my 40th, and got people ringing and texting and still trying to get this done....
I've included a copy of this database, named Timecards..
View 1 Replies
View Related
Oct 17, 2013
I need to export a table to a .csv file.
One of the fields in the table is "Posting Date". Data Type: Date/Time. Format: Short Date
All records in this field are dates. Format is "dd/mm/yyyy". None of the records include a time.
When I export the table to a .csv file, the time is added to the date. So the exported result is "dd/mm/yyyy 00:00:00" e.g. 17/10/2013 00:00:00
I am exporting the table using "delimited" format in the wizard.
I cannot use the fixed width option.
How do I prevent the time from being added?
View 1 Replies
View Related
Sep 2, 2014
I have a form that should give me all values below " 0" but I am getting zero
but when I click on that value I see this
-1.52587890625E-05
View 3 Replies
View Related