473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

why does it not work occasionally?

I have a main form (Main-member) with a cancel button. When user
click on the button, it open up another form (Frame40) and the user can
choose a cancel option and double click to close. But occasionally
the first 4 lines does not get executed. Does this has to do requery
issue?

Private Sub Frame40_DblClick(Cancel As Integer)
On Error GoTo Err_Frame40_DblClick
Dim rst, rst1 As DAO.Recordset
Me.DATECANCEL = Format(Now, "mm/dd/yy") 'form main_member
Me.CANCELS = True 'form
main_member
Me.csrID = CurrentUser() 'form
main_member
Me.cancellati = [conf] + [csrID] + Format(Now, "mm/dd/yy")
'form main_member
Set rst = CurrentDb.OpenRecordset("DailyReport", dbOpenDynaset)
With rst
rst.AddNew
rst!conf = conf
rst!csrID = CurrentUser
rst!cxlreason = Me.Frame40
rst.Update
End With
rst.Close
Set rst = Nothing
With Forms![MAIN-members].Child135.Form
Set rst1 = .RecordsetClone
rst1.AddNew
rst1!conf = conf
rst1!csrID = CurrentUser
rst1!csdate = DATE
rst1!comments = "cxl"
rst1.Update
rst1.Bookmark = rst1.LastModified
End With
rst1.Close
Set rst1 = Nothing
DoCmd.Close acForm, "cancel", acSaveYes
Exit_Frame40_DblClick:
Exit Sub
Err_Frame40_DblClick:
MsgBox Err.Description
Resume Exit_Frame40_DblClick
End Sub

May 10 '06 #1
0 1090

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Ing | last post by:
After 10 days, there haven't been any responses on my Amaya question. (The responses were more about the XHTML script than the particular question about "make book"). I'm beginning to wonder if...
5
by: bughunter | last post by:
Hi, Consider this code: ---- Monitor.Pulse(oLock); Monitor.Exit(oLock); ---- If a thread was waiting on oLock then will the current thread
7
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. ...
6
by: blue875 | last post by:
A tale of two queries: One query looks like this, and runs fine. We'll call this the "Customer1 query": SELECT Customer1 overall.*, IIf(IsNull(.),0,1) AS IsField, IIf(IsNull(.),0,1) AS...
34
by: NewToCPP | last post by:
Hi, Why does a C/C++ programs crash? When there is access to a null pointer or some thing like that programs crash, but why do they crash? Thanks.
33
by: bonk | last post by:
I have an application that needs to perform some background work, i.e. Logging, wich must not block the main thread. How would I basically design such a scenario? It is obvious that I should do...
1
by: questionit | last post by:
My mySQL very much slows down occasionally. I then have to shut the instance down and re-start it, this resolves the problem. what could have been causing mySQL to slow down occasionally. ...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
29
by: zalek | last post by:
I am writing application with Ajax in sync mode - xmlHttp.open("GET", url, false). I noticed that in FireFox handler doesn't starts. It starts when I use xmlHttp.open("GET", url,true). I need to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.