UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Recover deleted form    
 
   
PropMgr
post Feb 20 2010, 01:18 AM
Post#1



Posts: 1,199
Joined: 1-February 09
From: Sacramento, CA USA


Opps,
I just deleted a form that I spent several hours working on the logic of.
Is there any way to easily recover the form
Thanks
Go to the top of the page
 
Steve Schapel
post Feb 20 2010, 02:25 AM
Post#2


UtterAccess VIP
Posts: 3,881
Joined: 5-January 07
From: New Zealand


Hi Michael,
ssuming you don't have a backup (no, of course you don't, otherwise you wouldn't be asking the question)...
Here's the good news - whenever I do things like this, I usually find it is a lot quicker to re-do the job than it was the first time.
Go to the top of the page
 
PropMgr
post Feb 20 2010, 02:40 AM
Post#3



Posts: 1,199
Joined: 1-February 09
From: Sacramento, CA USA


Thanks Steve -
That makes me feel so much better....
a, your right, second time will be less ardous.
Take care, Michael
Go to the top of the page
 
GlenKruger
post Feb 20 2010, 07:21 PM
Post#4


Utterly Crispy UA Forum Administrator
Posts: 8,813
Joined: 29-September 01
From: Edmonton,Alberta,Canada


Sad to say but no.
create a a button on a form that won't need many controls in it's life time and on click event call this function.
Ohaven't tried it in Access 2007 but can't see why it won't work. That way when I make changes I back it up so I don't end up like you did.
CODE
Function VisualFileCopy(SourceFileName As String, TargetFileName As String)
'This routine will copy any size and type of file giving
'a visual progress indication to the user. Simply pass
'the Source Filename, Target Filename'
Dim I As Integer
Dim SourceFileNo As Integer
Dim TargetFileNo As Integer
Dim SourceFileSize As Long
Dim CopyBuffer As String
Dim X As Variant
Dim nPasses As Long
DoCmd.Hourglass True
On Error GoTo FileCopyErrorRoutine
CopyBuffer = Space$(25000) 'AS LARGE AS POSSIBLE UNDER 65, 0
'--KILL THE CURRENT TARGET FILE IF IT EXISTS
If Len(Dir$(TargetFileName)) Then
Kill TargetFileName
End If
'--OPEN FILES
SourceFileNo = FreeFile
Open SourceFileName For Binary Access Read As SourceFileNo
SourceFileSize = LOF(SourceFileNo)
nPasses = SourceFileSize / Len(CopyBuffer)
X = SysCmd(SYSCMD_INITMETER, "Copying File...", nPasses)
TargetFileNo = FreeFile
Open TargetFileName For Binary Access Write As TargetFileNo
'--COPY SOURCE FILE TO TARGET FILE
For I = 1 To nPasses - 1
Get #SourceFileNo, , CopyBuffer
X = SysCmd(SYSCMD_UPDATEMETER, I) ' Update meter.
Put #TargetFileNo, , CopyBuffer
DoEvents
Next I
'--COPY ANY ODD PORTION OF THE SOURCE FILE REMAINING
CopyBuffer = Space$(SourceFileSize - Loc(TargetFileNo))
If Len(CopyBuffer) Then
Get #SourceFileNo, , CopyBuffer
Put #TargetFileNo, , CopyBuffer
End If
Graceful_Exit:
Close SourceFileNo
Close TargetFileNo
DoCmd.Hourglass False
X = SysCmd(5) 'clear the status Bar
Exit Function
FileCopyErrorRoutine:
MsgBox Error$
GoTo Graceful_Exit
End Function
Go to the top of the page
 
Kassia
post Oct 14 2019, 04:57 AM
Post#5



Posts: 1
Joined: 14-October 19



Hi, if you have a backup, them things will be easy; you just need to recover your form on your backup. While if you don't have a backup, you may need to download a data recovery tool to do that. You can try the one called the Bitwar Data Recovery tool. I think it's useful in recovering data; you can have a try.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    18th November 2019 - 04:36 AM