Question Database Corrupt Issue

majid.pervaiz

Registered User.
Local time
Today, 16:26
Joined
Oct 15, 2012
Messages
110
Hi friends - I don't know what is the problem, whenever I compact and repair an access database and reopen after that the database get corrupt.

any idea why this issue happens
 
Compacting across an unreliable network can corrupt the file.

If that is the case then, first copy the file to the computer where Access is running and see if that makes any difference.
 
dear I am using it only on my pc that's it, it's not on network yet.
 
How do you notice that, get a message when you try to open it, or unable to open it at all?
Create a new database and copy all into it before the "Compact & Repair", then try to "Compact & Repair" the new database.
 
I can only open this worst database that's it.. seriously... I put 4 hours to do changes and all gone in trash... yesterday also same happened. neither I can export from this database or open a new database and import. this mainly is happening because of forms
 
see the screenshot, I am seriously tired of this database corrupt issue. the only thing I did is compact and repair and after that this crap happens
 

Attachments

  • corrupt database.jpg
    corrupt database.jpg
    61.2 KB · Views: 93
maybe its not corruption, maybe the program itself is corrupted.
 
what shall I do ? I have created another database it is working fine but the one which is corrupted it's not working at all I restarted my pc also
 
see the screenshot, I am seriously tired of this database corrupt issue. the only thing I did is compact and repair and after that this crap happens
Could you post your database, or is it even to big when you zip it?
 
this bloody hell access... makes my day hell... what if there is application crash issue?? what to do?
 
Try an Office repair.
Could you try on another computer.
 
yes I tried on another workstation... it worked over there... I create a new file from there and so far ok...
 
Then try the Office repair, or reinstall MS-Access, remove first the old MS-Access competently.
 
I don't know why in the below code if the risk approval date is on same day as req_date_time it is showing my message that you cannot put less than req_date_time

Private Sub Risk_app_date_LostFocus()
If Me.Risk_app_date >= Now() Then
MsgBox "You cannot put future date", vbCritical
Me.Risk_app_date.Value = ""

ElseIf Me.Risk_app_date < Me.Req_Date_Time Then
MsgBox "You cannot put Risk approval date less than request date", vbCritical
Me.Risk_app_date.Value = ""

ElseIf Me.Risk_app_date < Me.Resp_Date_Time Then
MsgBox "You cannot put Risk approval date less than response date", vbCritical
Me.Risk_app_date.Value = ""

ElseIf Me.Risk_app_date > Me.Publishing_date Then
MsgBox "You cannot put Risk approval date more than publishing date"
Me.Risk_app_date.Value = ""


End If


End Sub
 
You seem to have 2 issues.

-database corruption
-possible logic/coding error

but we don't know the value of Me.Req_Date_Time or any of your data.

Some of this
this bloody hell access
can be limited by some prudent debugging and testing.

See the links in my signature.

Good luck.
 
I would create a blank database, and import everything from the "bad" one to the new one.
 
@majid

maybe the approval date is today
but the approval TIME is midday today.

the first date/time IS earlier than the second.


try

ElseIf datevalue(Me.Risk_app_date) < datevalue(Me.Resp_Date_Time) Then

-----
note that date() is just the date but
now() is date PLUS time

note also, that your code doesn't seem to be testing for nulls.

----
personally, I would use the control's beforeupdate event, rather than lost focus.
 
Req_date_time is a field which capture task receiving request date and time (such as time stamp) once we receive the task we process and obtain risk approval i.e. risk_app_date

therefore, risk_app_date must not be less than req_date_time and this is what I am trying to achieve but on the same date it is showing error that risk_approval_date can't be less than request date...
 
well, that's why

a date of 12th July 2016 is less than a date of 12th July 2016 10:30am

I suggested disregarding the time element when comparing the "dates".
 
.... I am seriously tired of this database corrupt issue. the only thing I did is compact and repair and after that this crap happens
Have you got the corruption under control, if yes, what was the solution?
 

Users who are viewing this thread

Back
Top Bottom