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.OpenRecordset("tblProduct_Proctoree_DFU",
dbOpenDynaset)
Set rst2 = DB.OpenRecordset("tblProduct_Proctoree_DeviceTrain ing",
dbOpenDynaset)
rst1.AddNew
rst1!LinkID = Me.cboAddPhysician.Column(0)
rst1!ProctoreeFull_LF = Me.cboAddPhysician.Column(1)
rst1!PrimaryInstitution = Me.cboAddPhysician.Column(2)
rst1!PrimInstID = Me.cboAddPhysician.Column(3)
rst1!ProctoreeFull_FL = Me.cboAddPhysician.Column(4)
rst1!PrimaryInstAddress = Me.cboAddPhysician.Column(5)
rst1!PrimaryInstCity = Me.cboAddPhysician.Column(6)
rst1!PrimaryInstState = Me.cboAddPhysician.Column(7)
rst1!PrimaryInstZip = Me.cboAddPhysician.Column(8)
rst1!ProctoreeLast = Me.cboAddPhysician.Column(9)
rst1!ProctoreeFirst = Me.cboAddPhysician.Column(10)
rst1!ProctoreeMI = Me.cboAddPhysician.Column(11)
rst1!ProctoreeSuffix = Me.cboAddPhysician.Column(12)
rst1!ProctoreeLongDegree = Me.cboAddPhysician.Column(13)
rst1!ProctoreeDFUSpecialtyID = Me.cboAddPhysician.Column(14)
rst1!ProctoreeDFUSpecialty = Me.cboAddPhysician.Column(15)
rst1!Created = Now()
rst1.Update
rst2.AddNew
rst2!LinkID = Me.cboAddPhysician.Column(0)
rst2!PrimaryInstitution = Me.cboAddPhysician.Column(2)
rst2!PrimInstID = Me.cboAddPhysician.Column(3)
rst2!ProctoreeFull_FL = Me.cboAddPhysician.Column(4)
rst2!ProctoreeLast = Me.cboAddPhysician.Column(9)
rst2!ProctoreeFirst = Me.cboAddPhysician.Column(10)
rst2!ProctoreeMI = Me.cboAddPhysician.Column(11)
rst2!ProctoreeSuffix = Me.cboAddPhysician.Column(12)
rst2!ProctoreeLongDegree = Me.cboAddPhysician.Column(13)
rst2!TrainingCompletion_HospName = Me.cboAddPhysician.Column(2)
rst2!TrainingCompletion_HospID = Me.cboAddPhysician.Column(3)
rst2!Created = Now()
rst2.Update
Me.Filter = "LinkID= " & Me!cboAddPhysician.Column(0)
Me.FilterOn = True
Me.Requery
Me!cboAddPhysician.Value = ""
Me.Refresh
Me.cboFindMD.Visible = True
Me.cboAddPhysician.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_Hospitals_Product"
DB.Execute sSql
sSql = "SELECT qryDFU_Hospitals_Product.PrimInstID INTO
tblDFU_Hospitals_Product FROM qryDFU_Hospitals_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 1877
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.comwrote in
news:11**********************@h48g2000cwc.googlegr oups.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.microsoft.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.microsoft.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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
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: 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...
| |