Modules & VBA :: Access To Crash

Aug 21, 2013

So, my database appeared to be working OK yesterday however I occasionally saw an error in my "Update Event" script on one of my combo boxes.
today, now when I try the combo box, I get a immediate crash.If im assuming its the same combo box, here is the code for that box:

Code:

Private Sub MCAcmb_AfterUpdate()
Me.Model.RowSource = "SELECT DISTINCT [tbl].Record, [tbl].Model" & _
" FROM [tbl] WHERE Record = '" & Me.Recordcmb.Value & _
"' ORDER BY Model"

[code]...

I recently added a header...just tried it again and got the error:"The expression After Update you entered as the event property setting produced the following error:Object or class does not support the set of events."however I got it to work by entering VB, adding a space, removing it and then saving and entering the form view the form worked as normal. when i close and reload, i get the error again

View Replies


ADVERTISEMENT

How To Crash Access

Dec 11, 2004

It seems to be quite simple really. Make a form for Orders and add a subform for Order items. Write some VB code to chage values on the Order form when an Order item is added or amended. Add a "Find" dropdown to the Order form to find particular Order numbers.

Run the form and add/amend orders and items. This will work OK. Move to the next or subsequent order using the "Next" button. Add/Amend again - no problem. Drop down the "Find" control, select an order and the correct order comes up on the form. Amend an item. As the code attempts to change a text box on the Order form Access crashes.

The same code (to add up the items, take off discount and add on tax) can be run after a "Find" by changing a "Discount %" text box on the Order form and this works OK. Perhaps the Order form needs to be in focus for the code to work but I cannot see why this should be so.

In fact you don't actually need the "Find" dropdown. Any code that moves to another Order record programatically will cause Access to crash when an item is added/edited subsequently.

Making it crash is simple but stopping it has cost me a couple of days of frustation. Has anybody any ideas?

Regards

Peter

View 2 Replies View Related

Access Crash Rant

Apr 19, 2007

My Access 2000 project crashed and the computer dutifully asked to report the error to Microsoft, so I let it run. I then looked at the subsequent screen and was surprised. Well - silly me, maybe I shouldn't have been.:mad:

This screen simply said that Access 2000 was in "extended support" and my "solution" was to upgrade to a newer version. This was a bit irritating since the purpose of reporting feedback is to provide an opportunity to fix program bugs. So why ask the user to provide an error report if that report will simply be ignored and only used for a sales pitch.

While Microsoft has every right to discontinue product development, I would hope that they would still try to fix bugs that cause a program to crash. I guess Microsoft's quality control department has been outsourced to the same company that Dilbert works for. Additionally, I find euphemisms, such as "extended support" for "You are out of any help options, tough luck" to be quite irritating. Why not directly admit that we are on our own.

Also I am still on a slow boil over over the last six years by the fact that help for DAO/ADO disappeared from Access 2000 help which was in Acess97 help and Microsoft never got around to making it available as an update.

Back to work now.

View 7 Replies View Related

Access 2000 Crash & Burn

Mar 8, 2006

Hi

I have a DB which has been up and running with no problems for a couple of months.

A couple of users have recently had new machines installed. These are XP SP2 with Office 2000.

The Database FE is on the PC and the Backend is on the server.

When FE is first downloaded and opened it runs fine. The second time you go in the DB gets by the Splash screen but then crashes on the Title Menu. If you then recopy the FE to the machine it opens fine the first time then crashes again on the second attempt.

I have checked the references and all ok. I have full error trapping on the Splash screen and the Title Menu yet I just get the error "Access has encountered an error and needs to close..."

It runs fine on my machine which is XP SP2 with Office 2002. Has anyone any suggestions that I can check or repair this?

JC

View 8 Replies View Related

Database Crash With Access 2007

Feb 29, 2008

I have built a database with Access 2007, and intend on sharing the database amongst two users.

I am running Vista, and the two PC's or on a peer to peer network. Both with Vista.

I have split the database, and put separate copies of the front end on each of the PC's.

The backend of the database is on the public drive on my PC.

Access opens and functions correctly on both PC's with 1 User logged in.

However, if both users are logged in, my collegues PC crashes when it tries to open forms. This does not happen on my PC.

Does anyone have any ideas on what I need to change. Thanks in advance.

View 4 Replies View Related

Inserting Pictures Making Access Crash?

Nov 14, 2006

focking pissed off. i want to add an image to a some forms, the database is all working and that. but when i put a picture in in the design view and then go to view it the whole thing crashs. i nearly lost the whole data base from putting one on the home page, thank fock i had a back up and now ionly have to redo one form as the other one wont open anymore it will just crash every time i try to open it. i have no idea whats going on, i have other images that i put on it before, but i cant put any on now. anyone every encounted this and how do i over come it!

View 2 Replies View Related

Modules & VBA :: Network Crash - Any Way To Reconnect Objects Without Closing And Reopening Database

Oct 23, 2013

I have a database that runs a macro/report every 2 hours, however our network has been up and down lately. This causes the macro to fail when trying to log into the system because the table that is storing your username is no longer in the database. When I check, all tables, linked tables, forms, reports, macros and modules are all gone. I find the only way to get them back is to close the database and reopen.

What I want is a way to reconnect the objects without closing and reopening.

Is there a way to do this?

View 1 Replies View Related

Performance Issue Causing Access To Crash And Burn

Nov 2, 2005

Hi folks!

I've been experiencing a very frustrating problem recently.

One of my databases crahes randomly, and I'd like to know if some of you have tips to helps me.

The database is splited in front-end and back-end, both on the server. I know keeping the front-end on the client PC will improve performance, but due to a high number of users (about 60 to 80) and the need of doing frequent updates, installing the front-end on each machines is not an option for now.

Users are not all directly connected to the server. Those who are directly connecte4d to the server (in building A) have no problem. Those who don't (building B) have extensive lags on opening (about 30 seconds), and on about anything that calls an heavy query, most often leeding to a crash. Access display the message telling that the datbase needs to be repaired and restart.

I tryed several thing to improve my queries, like eleminating most of GROUP BY and UNIQUE clauses and avoiding the use of functions.

I have a lot of conditional formatting in the forms, but I don't think this is the problem, since it is executed on the local machine (as far as I know).

My theory is that the lags cause some call to the DB to timeout. I just dont know how to fix that. Is there an option to higher the timeout delay?

My other theory is that the problem is caused by dropped packets during the connection to the DB. I tryed downloading large files (100Mb to 250Mb) from the server several times and never had a problem. Although the connection is quite slow, the ping is very small, like below 10ms to 20ms. Is there better ways to test a network connection, if possible without installing software (limited rights on the machine)?

Would using Replicas be a solution? What are the pros and cons of it? I never used them and know very little about it. My idea would be of putting a back-end on both servers, but I guess the data would not be as live.

BTW, I am using Access 2002 (2000 file format) on an XP SP2 PC.

Thanks to all of you patient enough to read all of this! I Hope some of you have some awnsers, tips or tricks!

View 10 Replies View Related

General :: Combo / Text Box Link Causes Access To Crash

Oct 30, 2013

I've got a bit of a problem with linking a text box to a ComboBox. I have an employee name in a field [EmployeeName] that sits in the Header of a Form. (This is so I can show multiple records for that employee without having their name repeated at each one). I also have the name of contact [ContactName] that sits in the Detail area of the form.Both names come from their own tables that have all their contact numbers and e-mail addresses in columns I have linked the name to text boxes [ContactPhone] & [EmployeePhone] with their relevant phone numbers in within the Detail area of the form.

The ContactPhone that has the ContactName within the Details part of the form works well with no problems by putting =[ContactName].Column(1) in the Control Source

However when I put =[EmployeeName].Column(1) in the relevant Control Source (and / or EmployeeEMail in a second text box), once I have saved the form in Design view and returned to Form view, Access crashes and shuts down!If I remove the wording from the control source Access doesn't crash.

View 2 Replies View Related

Major Crash - Please Help!!

Jun 14, 2006

Hi all,

Yesterday my database crashed. It is the 'DEV' version for my application - so all of the current fixes/changes are in there and I have forgotten to backup!

It crashes when ever I try to enter the VBA editor, or build code. This occurred after a minor problem running some code (I forget which code).

Here is the error signature -

AppName: msaccess.exe AppVer: 11.0.6566.0 AppStamp:42cdb33e
ModName: vbe6.dll ModVer: 6.4.99.72 ModStamp:40b29ba6
fDebug: 0 Offset: 0008baa8

The same occurs when I try to get into the code builder in the repaired version access generates...I have also tried using compact & repair to get in - but still no joy.

Can anyone offer any advice workaround to get this up and running again?

Cheers

Robert

View 1 Replies View Related

Query Causes Crash

Jun 14, 2007

I am managing a traffic database and have currently constructed a series of queries that list average vehicle speed and total volume in five-minute intervals over the course of several months. From each of these queries, I need to create a subquery that, for each time interval, will simply average all speed values and sum all volumes into one record. Fields are: Time, Avg Of Speed, Sum Of Volume.

I created the subquery like so:
SELECT DISTINCTROW [Speed Weekday (2 SB)].Time, Avg([Speed Weekday (2 SB)].Speed) AS [Avg Of Speed], Sum([Speed Weekday (2 SB)].Volume) AS [Sum Of Volume]
FROM [Speed Weekday (2 SB)]
GROUP BY [Speed Weekday (2 SB)].Time;

When I attempt to switch to datasheet view though, Access locks up every time and I am forced to end the program through the task manager. The query I'm referencing [Speed Weekday (2 SB)] has only 4800 records thus far, so it isn't a ridiculous amount of data. Any advice as to what is going wrong? Thanks in advance for any help!

View 2 Replies View Related

Combo Box Crash

Dec 3, 2004

fairly new to access so this my be easy for sum.

have a form that uses comb boxes. Now the combo box is
Label "Tank Size" and looks up it's values in a Table named
"Tank Size" and stores the one you pick say 2500. Now the
problem. In the "Tank Size" table the row also has the price
in the next column. So when someone picks 2500 in the
combo box it will also list the price in say a text box or
something next to the combo box.
I hope i explained it o.k.

Thanks

View 2 Replies View Related

Crash To Desktop Issue

Jan 21, 2007

Hi all,

Today some of my users (primarily Access 9 users from what I can tell) have started experiencing weird Crash to Desktop issues.

The issue occurs when the user clicks a command button, which in turn should open an unbound form.

All other database functionality is working correctly.

The form is unbound, contains a combo, command button, listbox based on a query and several textboxes.

On open code is -

Private Sub Form_Load()

Me.cboType.Value = "Mail"
Me.lstResults.RowSource = "SELECT qryViewMail.ID, qryViewMail.Date_Received, qryViewMail.Customer_Name, qryViewMail.MDL_MVL, qryViewMail.Category, qryViewMail.Type FROM qryViewMail ORDER BY [ID];"
Me.lblStatus.Visible = False

End Sub



This functionality has worked correctly up until now.

Has anyone experienced similar issues before?

Thanks,

Rob

View 4 Replies View Related

Forms :: Loop Through Continuous Form Recordset Crash

Jun 27, 2014

My application crashes when trying to change the value of a text box in a continuous form. Here is the code:

Code:
Private Sub cboPoCurrency_AfterUpdate()
On Error GoTo ErrHandler
Dim rst As Recordset

[Code].....

If I replace .txtUnitCost by MsgBox .txtUnitCost, it loops correctly through each record and returns the value. But if I try to change the value as shown in above code, MS Access crashes! (This is a desktop application with tables linked to SP lists - not a web app)

[URL]

View 14 Replies View Related

Access VB Modules

Jan 18, 2005

Hi guys, im working on a project whereby a Visual Basic module has been designed in MS Access to email out a RTF document attachment of reports to shift managers when they have hazard items not closed in their area. Im building an ASP front-end to the database and would like to incorporate a button to do the mailout, however i dont know how i can link it to fire the code when the button is pressed. Is it even possible?

Nath

View 2 Replies View Related

Modules & VBA :: Emailing From Within Access?

Aug 29, 2014

I am trying to automate the process of sending a query result via email.

I have code that will export a query as an excel document, using DoCmd.SendObject, but it has the name of the query.

DoCmd.SendObject acSendQuery, "Dailyrpt", acFormatXLSX, email.address, , , "Daily Report", "This is today's report", -1, False (email.address would actually be the email address it is being sent to.)

I also have code that will export the query to excel and save it as a file, using DoCmd.OutputTo, where I was able to name it something meaningful to the end user, and include the date.

DoCmd.OutputTo acOutputQuery, "Dailyrpt", acFormatXLSX, "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx"
Dim Foldername As String
Foldername = "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx"
Shell "C:Program Files (x86)Microsoft OfficeOffice14EXCEL.exe """ & Foldername & "", vbNormalFocus

Is there a way to either send the saved (renamed) file or to include the current date as part of the SendObject command?

View 4 Replies View Related

Modules & VBA :: How To Know If PDF Is Printed From Access

May 7, 2015

I have a hyperlink for a pdf document in my access form.

The user will enter his id and then he access to this form

I want to know when he opens the hyperlink if he will print the pdf file or not

I want to save the name of the pdf file in a table if the user prints the hyperlink document from the form.

View 1 Replies View Related

Modules & VBA :: DOS Commands In Access

Mar 13, 2014

I was quite familiar with DOS commands and was able to create access DBs and write the VBA button code. However that was quite a few years ago and Ive forgotten it all.For every image file in DIR A or subdirectory If that image file exists in DIR B, then delete the image in DIR B.

View 3 Replies View Related

No VBA Modules In Access DB Running On OSX

Jan 7, 2013

I have just installed the windows version of Access 2010 on OSX Mountain Lion using a program called Crossover which works very similarly to WINE. I have found that Access will install fine except for VBA form modules and BAS modules, although there seems to be no indication that they did not install as the entire install progresses fine.

I've put together an invoicing program that was created in Access 2010 in Windows but have transferred it over to Access 2010 installed on OSX. It contains a number of forms with code but when I go to VBE, form code modules are not visible. When I try to view the code for a form I get the following error message: "Microsoft Access failed to create the Visual Basic module. If your database is on a network drive, check your network connection, then try again". I was able to insert a BAS module and create a rudimentary VBA subroutine which ran without error so it does seem able to interpret VBA as per normal.

View 2 Replies View Related

Modules & VBA :: Do Until Causes Access To Stop Responding

Dec 24, 2013

I'm using the following code:

Code:
Private Sub Form_Timer()
Dim LocalTime, StartWindow, EndWindow As Date
LocalTime = Format(TimeValue(Now()), "hh:mm")
StartWindow = #11:46:00 AM#
EndWindow = #11:48:00 AM#
Dim Response

[Code] ....

The intent is to run automated back end maintenance activities while giving the user the option to delay it if they're in the middle of something.

My logic is as follows:

If it's between these two times, ask the user if the maintenance can run.
If user says yes, run maintenance.
If user says no shift the two times to the right and ask again in a few minutes.

As it is written, when I chose no I get an hourglass icon and if I try to do anything else Windows tells me Access isn't responding. I'm guessing that Access is hanging since I've initiated the Do Until and then stalled it by telling it to wait 3 minutes before it goes to the next step. I suspect that if I waited it out, when the new Startwindow hit I would be asked about running the maintenance again.

My issue is that I need the database to remain responsive to whatever the user needs to do while I wait to ask about running maintenance again. Therefore, I don't think Do Until is my answer - at least not the way I've implemented it.

The will ultimately be set on a 10 minute timer interval and start/end window will be 01:00 and 01:15 AM respectively. The times you see above are there for testing so I can see what happens.

View 3 Replies View Related

Modules & VBA :: How To Search For Keywords On Access

Oct 29, 2014

I managed to create a form that is able to search keywords on Access 2007. However, the keyword search must be exact to what is contained in the table.

For example, I stored "red blue yellow" into the database, and I can only search "red blue yellow", "red blue" or "blue yellow" in order to call that data.

How do I make it such that I am able to search "blue red yellow", "yellow blue red" or "red yellow blue"?

These are my current codes:

Code:
Private Sub txtSearch_AfterUpdate()
Dim strWhere As String
Dim strWord As String
Dim varKeywords As Variant
Dim i As Integer
Dim IngLen As Long

[Code] ....

View 6 Replies View Related

Modules & VBA :: Adding A Field To Access DB

Aug 6, 2013

I use the following 3 calls to add 3 fields to an Access db,

Code:

Call subCreateField("tblRootCanalTreatment", "lngMethodID", "dbLong", strPath, 606)
Call subCreateField("tblRootCanalTreatment", "txtReferencePoint", "dbText", strPath, 620)
Call subCreateField("tblRootCanalTreatment", "txtSpaceForPole", "dbText", strPath, 644)

The sub is indicated below,

Code:

Private Sub subCreateField(strTable As String, strField As String, strFieldType As String, strPath As String, lngVersion As Long)

Dim rstSerial As ADODB.Recordset
Set rstSerial = New ADODB.Recordset
rstSerial.Open "tblSerial", CurrentProject.connection, adOpenKeyset, adLockPessimistic
rstSerial.MoveFirst
If rstSerial!lngVersion < lngVersion Then

[code]....

Only the first field ("lngMethodID") gets created. The other two fields ("txtReferencePoint") and ("txtSpaceForPole") do not get created. If I exit the db before each sub call then all fields get added. Do I need to add some "refresh field" action or other action.

View 14 Replies View Related

Modules & VBA :: How To Add Pictures Into PowerPoint Using Access

Aug 17, 2013

I am using access 2013 to make a PowerPoint presentation based on the data in a query. I know how to do that much using VBA but I am also trying to make a slide with a picture on it from a saved location.

Dim db As Database, rs As Recordset
Dim ppObj As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
On Error GoTo err_cmdOLEPowerPoint

[code]....

At the moment I am not worrying about adding the data as I know how to do this and had it working before - its just adding the picture to the slide.

View 2 Replies View Related

Modules & VBA :: Access - Get SubForm Datasheet Value Of Row?

Feb 27, 2015

I have a subform which is created with textbox and some command button in the top of the window, so this will simulate like a Datagrid.

[URL]

This is how it looks my datagrid when it fills from a Query.

[URL]

What I want is when I select a row from my subform, I want to Click the button "Cambiar", and get the value of the machine selected.

[URL]

View 4 Replies View Related

Modules & VBA :: If And NZ Statement Not Working In Access?

Jul 8, 2015

why this IF and Nz statement in my code below is not working. I know the me.txtrefNo value is "" (null) on a form field with property set to General Number. Therefore the Nz statement should return a "0" as I specified making the statement true as in 0 = 0 and then execute the actions below to generate a reference number however this it now happening as it's rendering the if statement as false and showing me the message " Whats going On?" which is after the else statement.

Code:
If Nz(Me.txtrefNo, 0) = 0 Then
Me.txtrefNo = DMax("[refNo]", "[R_P_Data_P]") + 1
tmpRefNo = Me.txtrefNo
'testing variable value
MsgBox (tmpRefNo)
Else
MsgBox ("What's going on?")
End If

PS. Does this have anything to do with the table field format that the me.txtrefNo value will be saved to?

View 2 Replies View Related

Modules & VBA :: Export To Word From Access

Sep 26, 2013

I'm trying to create an export to word but am having some trouble. I keep getting the following error;

Run time error '91'; variable or object of With block not defined.

This error occurs at Set TblWord = docNew.Tables.Add(Selection.Range, 3, 5)

I have a feeling its 'Selection' that is causing the problem but I can't work it out!

Code:
Dim AppWord As Word.Application
Dim DocWord As Word.Document
Dim TblWord As Word.Table

[Code]......

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved