Hi,
I have a combo box on a form whose purpose is to add a record to the
form's underlying table. There are several (16) fields that the combo
box carries with it, only a few that are visible to the User. When the
User selects a value from the combo box, the application shuts down.
Here is the code for the combo box that may lead to the problem.
=============== =============== =============== =
Private Sub cboAddPhysician _AfterUpdate()
On Error GoTo PROC_ERR
Dim DB As Database
Dim rst1 As Recordset
Dim rst2 As Recordset
Set DB = CurrentDb
Set rst1 = DB.OpenRecordse t("tblProduct_P roctoree_DFU",
dbOpenDynaset)
Set rst2 = DB.OpenRecordse t("tblProduct_P roctoree_Device Training",
dbOpenDynaset)
rst1.AddNew
rst1!LinkID = Me.cboAddPhysic ian.Column(0)
rst1!ProctoreeF ull_LF = Me.cboAddPhysic ian.Column(1)
rst1!PrimaryIns titution = Me.cboAddPhysic ian.Column(2)
rst1!PrimInstID = Me.cboAddPhysic ian.Column(3)
rst1!ProctoreeF ull_FL = Me.cboAddPhysic ian.Column(4)
rst1!PrimaryIns tAddress = Me.cboAddPhysic ian.Column(5)
rst1!PrimaryIns tCity = Me.cboAddPhysic ian.Column(6)
rst1!PrimaryIns tState = Me.cboAddPhysic ian.Column(7)
rst1!PrimaryIns tZip = Me.cboAddPhysic ian.Column(8)
rst1!ProctoreeL ast = Me.cboAddPhysic ian.Column(9)
rst1!ProctoreeF irst = Me.cboAddPhysic ian.Column(10)
rst1!ProctoreeM I = Me.cboAddPhysic ian.Column(11)
rst1!ProctoreeS uffix = Me.cboAddPhysic ian.Column(12)
rst1!ProctoreeL ongDegree = Me.cboAddPhysic ian.Column(13)
rst1!ProctoreeD FUSpecialtyID = Me.cboAddPhysic ian.Column(14)
rst1!ProctoreeD FUSpecialty = Me.cboAddPhysic ian.Column(15)
rst1!Created = Now()
rst1.Update
rst2.AddNew
rst2!LinkID = Me.cboAddPhysic ian.Column(0)
rst2!PrimaryIns titution = Me.cboAddPhysic ian.Column(2)
rst2!PrimInstID = Me.cboAddPhysic ian.Column(3)
rst2!ProctoreeF ull_FL = Me.cboAddPhysic ian.Column(4)
rst2!ProctoreeL ast = Me.cboAddPhysic ian.Column(9)
rst2!ProctoreeF irst = Me.cboAddPhysic ian.Column(10)
rst2!ProctoreeM I = Me.cboAddPhysic ian.Column(11)
rst2!ProctoreeS uffix = Me.cboAddPhysic ian.Column(12)
rst2!ProctoreeL ongDegree = Me.cboAddPhysic ian.Column(13)
rst2!TrainingCo mpletion_HospNa me = Me.cboAddPhysic ian.Column(2)
rst2!TrainingCo mpletion_HospID = Me.cboAddPhysic ian.Column(3)
rst2!Created = Now()
rst2.Update
Me.Filter = "LinkID= " & Me!cboAddPhysic ian.Column(0)
Me.FilterOn = True
Me.Requery
Me!cboAddPhysic ian.Value = ""
Me.Refresh
Me.cboFindMD.Vi sible = True
Me.cboAddPhysic ian.Visible = False
Set rst1 = Nothing
Set rst2 = Nothing
Set DB = Nothing
Exit Sub
PROC_ERR:
MsgBox "The following error occured: " & Error$
Resume Next
End Sub
=============== =============== =============== ========
Private Sub cboAddPhysician _Exit(Cancel As Integer)
On Error GoTo PROC_ERR
Dim DB As Database
'Dim dbs As DAO.Database
Dim sSql As String
Set DB = CurrentDb()
' 1) Delete and append records
sSql = "DROP TABLE tblDFU_Hospital s_Product"
DB.Execute sSql
sSql = "SELECT qryDFU_Hospital s_Product.PrimI nstID INTO
tblDFU_Hospital s_Product FROM qryDFU_Hospital s_Product;"
DB.Execute sSql
Set DB = Nothing
Exit Sub
PROC_ERR:
MsgBox "The following error occured: " & Error$
Resume Next
End Sub
=============== =============== =============== =======
Any help you can lend to help with my troubleshooting would be
appreciated.
Henry 5 1888
Henry Stockbridge wrote:
Hi,
I have a combo box on a form whose purpose is to add a record to the
form's underlying table. There are several (16) fields that the combo
box carries with it, only a few that are visible to the User. When the
User selects a value from the combo box, the application shuts down.
Here is the code for the combo box that may lead to the problem.
Set a breakpoint at the first executable statement in your combo box
afterupdate event and then step through one line at a time until your
app crashes. This should give you some more information to go on (and
us too if you should require further assistance).
HTH,
Bruce de************* **@gmail.com wrote:
Henry Stockbridge wrote:
Hi,
I have a combo box on a form whose purpose is to add a record to the
form's underlying table. There are several (16) fields that the combo
box carries with it, only a few that are visible to the User. When the
User selects a value from the combo box, the application shuts down.
Here is the code for the combo box that may lead to the problem.
Set a breakpoint at the first executable statement in your combo box
afterupdate event and then step through one line at a time until your
app crashes. This should give you some more information to go on (and
us too if you should require further assistance).
HTH,
Bruce
Thanks for your answer. I neglected to say that the code
runs error free on my computer and one other workstation.
The procedure fails on all other computers. I am not that
adept at performance related issues, so could this be a
system (OS or MS Access) issue?
Nonetheless, I took the code and tested three iterations of
the procedure:
1 All code running in the After Update procedure (moved
the OnExit code to AfterUpdate)
2 RST1 procedure only
3 RST1 & RST2 procedures only
All work fine on my computer, the other workstation, and
crashes on all others. Any other ideas I should investigate
and test.
Thanks again,
Henry
"Henry Stockbridge" <hs***********@ hotmail.comwrot e in
news:11******** **************@ h48g2000cwc.goo glegroups.com:
> de************* **@gmail.com wrote:
>Henry Stockbridge wrote:
Hi,
I have a combo box on a form whose purpose is to add a
record to the form's underlying table. There are several
(16) fields that the combo box carries with it, only a few
that are visible to the User. When the User selects a
value from the combo box, the application shuts down.
Here is the code for the combo box that may lead to the
problem.
Set a breakpoint at the first executable statement in your combo box afterupdate event and then step through one line at a time until your app crashes. This should give you some more information to go on (and us too if you should require further assistance).
HTH, Bruce
Thanks for your answer. I neglected to say that the code
runs error free on my computer and one other workstation.
The procedure fails on all other computers. I am not that
adept at performance related issues, so could this be a
system (OS or MS Access) issue?
Nonetheless, I took the code and tested three iterations of
the procedure:
1 All code running in the After Update procedure (moved
the OnExit code to AfterUpdate)
2 RST1 procedure only
3 RST1 & RST2 procedures only
All work fine on my computer, the other workstation, and
crashes on all others. Any other ideas I should investigate
and test.
Thanks again,
Henry
Go to one of the crashing computers.
Modify your procedure by adding the word stop in the location
shown
Private Sub cboAddPhysician _AfterUpdate()
stop 'add this command here, for testing.
'remove after the problem has been fixed
On Error GoTo PROC_ERR
Dim DB As Database
Run your process. when the event fires the program will stop and
display the code editor. Press the F8 key to execute one
statement at a time. the line to be next executed will be
highlighted (yellow on most computers). Press F8 and note which
line is highlited. Continue until the problem occurs. You will
have found the problem. Once we know what the problem is, we can
try to fix it..
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
Greetings Henry,
Thanks for your answer. I neglected to say that the code
runs error free on my computer and one other workstation.
The procedure fails on all other computers. I am not that
adept at performance related issues, so could this be a
system (OS or MS Access) issue?
Nonetheless, I took the code and tested three iterations of
the procedure:
1 All code running in the After Update procedure (moved
the OnExit code to AfterUpdate)
2 RST1 procedure only
3 RST1 & RST2 procedures only
All work fine on my computer, the other workstation, and
crashes on all others. Any other ideas I should investigate
and test.
The next things I would try are copying the working file from a machine
where the code executes correctly to one that doesn't, i.e., make sure
you are using identical versions of your program. Next make sure that
all machines are up to date with respect to service packs for
Office/Access (go to officeupdate.mi crosoft.com and click the 'check
for updates' link). Finally make sure that Windows on each machine is
also updated with the current service release. Although it is remotely
possible that you have some kind of hardware problem (i.e. bad RAM) it
is far far more likely to be a software issue.
Bruce de************* **@gmail.com wrote:
Greetings Henry,
Thanks for your answer. I neglected to say that the code
runs error free on my computer and one other workstation.
The procedure fails on all other computers. I am not that
adept at performance related issues, so could this be a
system (OS or MS Access) issue?
Nonetheless, I took the code and tested three iterations of
the procedure:
1 All code running in the After Update procedure (moved
the OnExit code to AfterUpdate)
2 RST1 procedure only
3 RST1 & RST2 procedures only
All work fine on my computer, the other workstation, and
crashes on all others. Any other ideas I should investigate
and test.
The next things I would try are copying the working file from a machine
where the code executes correctly to one that doesn't, i.e., make sure
you are using identical versions of your program. Next make sure that
all machines are up to date with respect to service packs for
Office/Access (go to officeupdate.mi crosoft.com and click the 'check
for updates' link). Finally make sure that Windows on each machine is
also updated with the current service release. Although it is remotely
possible that you have some kind of hardware problem (i.e. bad RAM) it
is far far more likely to be a software issue.
Bruce
Hi,
First, thanks for all your comments. They have been extremely helpful.
Well, I looked at the computers where the application crashed and
compared them to the working application computers, and alas, the
Access versions are different! The application does not crash on
Access version (11.6566.8036 - SP2), but it does crash on version
(11.5614.8036.) I will work on getting the latest service packs
installed, and see what happens.
Henry This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Richard |
last post by:
Hi,
I have a form that take some time to load due to many comboboxes and at
least 8 subforms.
When I filter or sort the main form I get an error message and then Access
shuts down. They ask if I want to send the error report to Microsoft. Has
anybody seen this type of error message and what can I do to prevent it from
happening. Am I doing something illegal in my code? It used to work but I
have added conditional formatting to a subform...
|
by: Robert Neville |
last post by:
The solution to my dilemma seems straight-forward, yet my mind has not
been forthcoming with a direct route. My Project form has a tab
control with multiple sub-forms; these distinct sub-forms relate
addresses (multiple addresses); companies, contacts, and tasks to each
project (one to many).
My challenge lies with the task sub-form which links to the Project
form through ProjID. The task record links back to the respective
master...
|
by: andersboth |
last post by:
I want to run some code when my Windows Form Application is being shut
down.
I want to run this code when the Application is being shut down in the
following situation:
1. The App is being shut down by the user.
2. The App is being shut down because of Windows System Shut Down.
3. The App Process is being killed in Task Manager
|
by: DKode |
last post by:
Ok,
I restart the aspnet_wp.exe, memory usage is at about 3 mb, the first
time I run one of my asp.net apps, the memory usage shoots to 30 mb
usage and remains there. Even if I close the IE window that I am
running my app in, the memory is not freed up. Is this normal? I am
imagining that the GC never cleans out the memory that aspnet_wp is
using.
Thank you
|
by: marcmc |
last post by:
I have an icon that points at a server application written in dotNet.
I wish to allow the users on distributed pc's to be able to close the
application and walk away but I have to ensure that this does not shut down
the actual application on the server.
In this way the application on the server acts kind of like a service but it
can never be closed down on the server.
Has anybody any idea how to implement this or indeed can it be...
| |
by: oll3i |
last post by:
Why my rmi server shuts down? when i run it it starts and then shuts down
here is the server code
import java.util.Properties;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import PhoneDirectory.PhoneDirImpl;
|
by: TC |
last post by:
I'm experiencing an unusual problem. When I run a specific make-table
query on a computer, that computer shuts down. The computer shuts down
completely, without warning, as if a power failure occurred.
I can run the query without any trouble on other computers. I can also
run other queries on this computer, including make-table queries which
create much bigger tables.
When it works (on other computers), the make-table query creates a...
|
by: nagar |
last post by:
Hi,
in a .NET 2.0 application, I'm noticing that sometimes the application
simply crashes and exists without showing any message. I have the
impression this has to do with some exceptions that are generated in a
secondary thread (if I'm not mistaken .NET 2.0 shuts down a process if
an exception is generated in a secondary thread).
How can I catch all the unhandled exception is any thread so that I
can display an error message to the...
|
by: Cramer |
last post by:
I'm running XP Pro/SP2 + patches and updates, with Visual Studio
Professional 2008 (and no prior installation of Visual Studio ever
installed).
When attempting to open an ASP.NET Web application project, Visual Studio
shuts down immediately and with no error message. I can open Visual Studio -
but when subsequently attempting to open the project, Visual Studio
immediately shuts down.
More specifically:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |